NexFlow Assistant is a 3-tier AI business automation system built for the Codenixia assessment.
442
NexFlow Assistant is a 3-tier AI business automation system built for the Codenixia assessment. It includes a React frontend, FastAPI backend, SQLite persistence, Gemini-powered chat, lead capture automation, JWT authentication, and CI/CD support.
users and leads tables.gemini-2.5-flash)app.pyNexFlow_Assistant/
├── backend/
│ ├── main.py
│ ├── auth.py
│ ├── ai.py
│ ├── database.py
│ ├── schemas.py
│ └── routes/
├── frontend/
│ ├── src/
│ │ ├── pages/
│ │ ├── components/
│ │ ├── App.jsx
│ │ └── api.js
│ ├── Dockerfile
│ └── package.json
├── Dockerfile
├── docker-compose.yml
├── Jenkinsfile
└── .github/workflows/ci.yml
Create .env in the project root:
GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_MODEL=gemini-2.5-flash
JWT_SECRET=replace_with_a_long_random_secret
JWT_EXPIRE_HOURS=24
DATABASE_PATH=nexflow_data.db
For the frontend, create frontend/.env if your API URL is different:
VITE_API_URL=http://localhost:8000
Install backend dependencies:
python -m venv venv
source venv/bin/activate
python -m pip install -r requirements.txt
Run the FastAPI backend:
uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000
Install and run the React frontend:
cd frontend
npm install
npm run dev
Open:
Frontend: http://localhost:5173
Backend API: http://localhost:8000
API Docs: http://localhost:8000/docs
The first registered user automatically gets the admin role. Later users get the user role.
Run both tiers with Docker Compose:
docker compose up --build
Open:
Frontend: http://localhost:5173
Backend API: http://localhost:8000
Build images separately:
docker build -t nexflow-backend .
docker build -t nexflow-frontend ./frontend
This repository includes:
Dockerfile: Builds the FastAPI backend image.frontend/Dockerfile: Builds the React frontend and serves it with Nginx.docker-compose.yml: Runs backend and frontend together.Jenkinsfile: Validates code, builds frontend, builds Docker images, and pushes to Docker Hub..github/workflows/ci.yml: Runs backend validation, frontend build, and Docker image builds.docs/devops.md: Documents Docker, Jenkins, and GitHub integration.Required Jenkins setup:
node:22-alpine.DOCKERHUB_CREDENTIALSpriyanshuksharmaAdd your deployed frontend and backend links here after hosting.
Add your 5-7 minute demo video link here.
Content type
Image
Digest
sha256:bcbd89158…
Size
210.7 MB
Last updated
5 months ago
docker pull priyanshuksharma/nexflow-backend