Full-stack ML application with Next.js frontend and Flask backend.
FurEverAI/
├── client/ # Next.js frontend (Port 3000)
│ ├── app/ # App Router pages
│ ├── lib/ # API helpers and utilities
│ └── .env.local # Environment variables
└── server/ # Flask backend (Port 5000)
├── server.py # Main Flask app
└── requirements.txt
cd server
python -m venv .venv
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
. .venv\Scripts\Activate.ps1
pip install -r requirements.txt
python server.pyBackend runs at: http://localhost:5000
cd client
npm install
npm run devFrontend runs at: http://localhost:3000
- Work in
client/app/for pages and UI - Use
client/lib/api.tsto call backend endpoints - All styling in
client/app/globals.cssor component-level - Backend connection is already configured
- Work in
server/server.py- implement model in/api/predictendpoint - Add ML dependencies to
server/requirements.txt - Backend is configured with CORS for frontend communication
GET /api/health- Check server statusGET /api/home- Home endpointPOST /api/predict- Model prediction (accepts JSON or file upload)
Create client/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:5000
- Backend uses Flask with CORS enabled
- Frontend uses Next.js 14+ App Router
- API layer abstracted in
lib/api.tsfor clean separation