Skip to content

blaxkmiradev/manadb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manadb - Rikixz's MongoDB Alternative

Manadb Logo

Version Python License

A lightweight, JSON-based database management system built with Python Flask. Inspired by MongoDB but simpler.

Features

  • Full CRUD operations (Create, Read, Update, Delete)
  • User authentication with roles (admin, readwrite, readonly)
  • Web control panel with modern white design
  • JSON file-based storage
  • RESTful API
  • Developer API documentation
  • Demo store app included

Installation

git clone https://github.com/blaxkmiradev/manadb.git
cd manadb
pip install -r requirements.txt

Quick Start

python app.py

Server will start at http://localhost:5000

Usage

Control Panel

  • Open http://localhost:5000
  • Login with: admin / manadb2024

API Access

import requests

headers = {
    "X-Username": "your_user",
    "X-Password": "your_password"
}

# Insert document
requests.post("http://localhost:5000/api/users", 
    json={"name": "John", "age": 25},
    headers=headers)

# Find documents
requests.get("http://localhost:5000/api/users", headers=headers)

Users

Username Password Role Access
admin manadb2024 admin Full access
developer dev123 readwrite Read/Write
user user123 readonly Read only

Pages

Route Description
/ Admin Panel (login required)
/login Login page
/store Demo store app
/docs Developer documentation

API Endpoints

Authentication

POST /api/auth/login     - Login
POST /api/auth/logout  - Logout
GET  /api/auth/verify  - Verify token

Collections

GET    /api/collections             - List collections
POST   /api/collections           - Create collection
DELETE /api/collections/<name>   - Drop collection

Documents

POST   /api/<collection>              - Insert document
GET    /api/<collection>              - Find documents
GET    /api/<collection>/<id>       - Find one
PUT    /api/<collection>/<id>       - Update
DELETE /api/<collection>/<id>       - Delete

Execute

POST /api/db/execute   - Execute commands

Project Structure

manadb/
├── app.py              # Flask server
├── config.json         # Configuration
├── requirements.txt   # Dependencies
├── logo.jpg          # Logo
├── run.bat           # Run script
├── README.md        # This file
├── db_engine/
│   └── database.py # Database engine
├── templates/
│   ├── index.html      # Admin panel
│   ├── login.html    # Login page
│   ├── demo.html    # API demo
│   ├── demo_store.html # Store demo
│   └── docs.html    # Docs
└── data/           # Database files

Demo Store

Try the store demo to see Manadb in action:

python app.py
# Open http://localhost:5000/store

Author

Rikixz - github.com/blaxkmiradev


Made with love by Rikixz

About

the open source database from scratch made with python flask and json

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors