Skip to content

tanima-pr/CalorieLensBackend

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CalorieLens Backend

This is the backend service for CalorieLens — an API built with FastAPI to process meal data, ingredient recognition, and nutrition estimation.


🧩 Tech Stack

  • Language: Python 3.10+
  • Framework: FastAPI (recommended for async APIs)
  • Server: Uvicorn
  • Database: Not specified; can be configured.

📦 Project Structure

CalorieLensBackend/app/
├── app/
│   ├── main.py          # Entry point
│   ├── routers/         # API routes/endpoints
│   ├── models/          # Database models (if any)
│   └── utils/           # Helper scripts
├── requirements.txt
├── .env                 # Environment configuration
└── README.md

⚙️ Setup Instructions

1. Clone the Repository

git clone https://github.com/<your-org-or-username>/CalorieLensBackend.git
cd CalorieLensBackend

2. Create Virtual Environment

python -m venv .venv
source .venv/bin/activate      # On Windows: .venv\Scripts\activate

3. Install Dependencies

pip install -r requirements.txt

🚀 Running the Server

Development Mode

uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

Visit: http://127.0.0.1:8000/docs for interactive Swagger UI.


🔑 Environment Variables

Create a .env file at the project root. Common variables:

APP_ENV=development
PORT=8000
LOG_LEVEL=info
# Backend config
DB_URL=sqlite:///./calorielens.db
API_KEY=your_api_key_here
ALLOWED_ORIGINS=http://localhost:5173


🧰 API Endpoints (example)

Method Endpoint Description
POST /api/recognize Upload an image and analyze nutritional content
GET /api/meals Retrieve logged meals
GET /health Health check endpoint

📚 License

This project is licensed under the MIT License.

About

Proof of Concept for Ingredients identification and calorie calculation mobile application

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 97.9%
  • Dockerfile 2.1%