A full-stack web application for logging meals, tracking daily calorie intake, and monitoring nutrition goals over time. Built with Next.js and TypeScript, with secure user authentication and a persistent database.
Live demo: calorie-tracker-ashy.vercel.app
Calorie Tracker lets users create an account, log the foods they eat throughout the day, and see their calorie totals against a personal goal. Each user's data is private to their account, persisted in a database, and available across sessions.
The project was built to practice end-to-end application development: designing a data model, wiring up authentication, building a typed frontend, and deploying to production.
- User authentication — secure sign-up and login via NextAuth
- Daily food logging — add meals and entries with calorie values
- Calorie totals & goals — track intake against a personal daily target
- Per-user data — each account's entries are private and persisted
- Responsive UI — works across desktop and mobile
| Layer | Technology |
|---|---|
| Framework | Next.js (React) |
| Language | TypeScript |
| Database ORM | Prisma |
| Authentication | NextAuth |
| Deployment | Vercel |
- Node.js (v18 or later)
- A database supported by Prisma (e.g. PostgreSQL, SQLite)
-
Clone the repository:
git clone https://github.com/rogervera/calorie-tracker.git cd calorie-tracker -
Install dependencies:
npm install
-
Set up environment variables. Create a
.envfile in the root with:DATABASE_URL="your-database-connection-string" NEXTAUTH_SECRET="your-nextauth-secret" NEXTAUTH_URL="http://localhost:3000" -
Run database migrations:
npx prisma migrate dev
-
Start the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
calorie-tracker/
├── prisma/ # Database schema and migrations
├── public/ # Static assets
├── src/ # Application source (pages, components, logic)
└── ... # Config files
This project was developed with the assistance of AI-based development tools as part of a modern, AI-assisted workflow — used for scaffolding, debugging, and iteration while I directed the architecture, data model, and feature decisions.
This project is available for viewing as a portfolio piece.