SmartFoodie is a robust full-stack application with a Next.jsfrontend and a FastAPI backend, designed to serve the needs of sales consultants. By incorporating cutting-edge technologies such as Generative AI, Natural Language Processing (NLP), and data science, our solution offers advanced and tailored services. This integration ensures that sales consultants have the tools they need for enhanced productivity and personalized client interactions.
Before you begin, ensure you have the following installed:
- Node.js and npm (for frontend)
- Python (version 3.10-3.12)
- Rust and Cargo (To ensure transformers installation is error free)
- Git
rustc --version
cargo --versionNavigate to the backend directory and create a virtual environment:
cd Backend
python -m venv venvWindows:
venv\Scripts\activateUnix or MacOS:
source venv/bin/activatepip install fastapi uvicorn scikit-learn joblib pandas xgboost torch transformers
pip install mysql-connector-python sqlalchemy databases
pip install passlib[bcrypt]
pip install python-dotenv
pip install python-jose pymysql
pip install sentencepieceuvicorn app:app --reloadThe backend server will start at http://localhost:8000
If you encounter "Running scripts is disabled" error, run PowerShell as Administrator and execute:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUsercd frontend
npm installnpm run devThe frontend will be available at http://localhost:3000
- Open the project in VS Code
- Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(MacOS) - Select "Python: Select Interpreter"
- Choose the interpreter from virtual environment:
- Windows:
Backend\venv\Scripts\python.exe - Unix/MacOS:
Backend/venv/bin/python
- Windows:
/
├── Backend/
│ ├── app.py
│ ├── requirements.txt
│ └── [other backend files]
├── frontend/
│ ├── pages/
│ ├── components/
│ ├── package.json
│ └── [other frontend files]
└── README.md
uvicorn app:app --reload # Start development servernpm run dev # Start development server
npm run build # Build for production
npm start # Start production server