Mentra is a full-stack, AI-powered knowledge management platform. It enables users to create, visualize, and manage their personal knowledge graph with interactive mind maps, semantic search, and Retrieval-Augmented Generation (RAG) using vector databases and LLMs.
- Interactive Mind Map Visualization: Create, link, and manage notes and files visually.
- AI-Powered Semantic Search: Query your knowledge graph using natural language.
- Retrieval-Augmented Generation (RAG): Get context-aware answers from your own data.
- Full-Stack Solution: Next.js (React, TypeScript) frontend + FastAPI backend.
- ORM & Migrations: SQLAlchemy and Alembic for robust database management.
- Frontend: Next.js, React, TypeScript
- Backend: FastAPI, Python
- Database: PostgreSQL (default, can be changed)
- Vector Store: Pinecone
- ORM: SQLAlchemy
- Migrations: Alembic
- AI/Embeddings: LangChain, OpenAI
- Containerization: Docker, Docker Compose
git clone https://github.com/vishalmakwana111/mentra.git
cd mentra
The provided docker-compose.yml
(in mind-map-mentor/backend/
) will start only the PostgreSQL database service. Backend and frontend must be started manually (see below).
cd mind-map-mentor/backend
docker-compose up
- The PostgreSQL database will be available at:
localhost:5432
- Backend and frontend are NOT started by this command.
- Create and activate a virtual environment (recommended):
cd mind-map-mentor/backend python -m venv .venv # On Windows: .venv\Scripts\activate # On macOS/Linux: source .venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables (see
.env.example
). - Run database migrations:
alembic upgrade head
- Start the backend server:
uvicorn app.main:app --reload
- Install dependencies:
cd mind-map-mentor/frontend npm install
- Start the frontend:
npm run dev
- Visit
http://localhost:3000
in your browser.
- SQLAlchemy is used for all database models and queries.
- Alembic handles schema migrations.
- Create a new migration after changing models:
alembic revision --autogenerate -m "Describe your change"
- Apply migrations to the database:
alembic upgrade head
- (Optional) Downgrade migration:
alembic downgrade -1
- Alembic config is in
backend/alembic.ini
. - Migration scripts are in
backend/alembic/versions/
.
mentra/
├── mind-map-mentor/
│ ├── backend/ # FastAPI backend, ORM, Alembic, AI logic
│ └── frontend/ # Next.js frontend
- Fork the repo and create your branch.
- Commit your changes.
- Push to your fork and submit a pull request.
Questions?
Open an issue or contact the maintainer!