Skip to content
Discussion options

You must be logged in to vote

Your architecture is generally correct. For a first production MVP, I would not start with Next.js + FastAPI + Redis + multiple microservices. That adds complexity before you need it.

Use a modular monolith:

Next.js
├── React UI
├── Server/API layer
├── AI service
├── RAG service
├── Memory service
└── Database layer
        |
        ├── PostgreSQL
        └── pgvector

Object Storage
└── PDFs / documents

LLM Provider
└── OpenAI / Gemini / Anthropic

1. Project structure

Your structure is good. I would organize it approximately like this:

src/
├── app/
│   ├── chat/
│   ├── login/
│   ├── dashboard/
│   └── api/
│       ├── chat/
│       ├── documents/
│       ├── conversations/
│      …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bungakarunanidhi
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Ask and answer questions about GitHub features and usage Programming Help Discussions around programming languages, open source and software development source:ui Discussions created via Community GitHub templates
4 participants