Calorie Compass is a full-stack calorie tracking application built with Next.js, Prisma, PostgreSQL, and Clerk authentication.
Users can securely create an account, track meals, monitor daily calorie intake, set personalized calorie goals, and visualize progress through an interactive dashboard.
- Secure user authentication with Clerk
- Sign up and sign in with Google or Email
- Protected dashboard routes
- User profile management
- Create meals
- Edit meals
- Delete meals with confirmation dialog
- Categorize meals (Breakfast, Lunch, Dinner, Snack)
- Daily calorie tracking
- Protein, carbohydrate, and fat summaries
- Personalized calorie goals
- Progress bar showing goal completion
- Dynamic mascot/progress image system
- Recent meal history
- Custom daily calorie goal
- Goal progress recalculation
- PostgreSQL database hosted on Neon
- Prisma ORM for type-safe database access
| Technology | Purpose |
|---|---|
| Next.js 16 | Full-stack React framework |
| TypeScript | Type safety |
| Tailwind CSS | Styling |
| Shadcn UI | UI components |
| Prisma | ORM |
| PostgreSQL (Neon) | Database |
| Clerk | Authentication |
| Lucide React | Icons |
| Vercel | Deployment |
- Daily calorie progress
- Nutrition summary cards
- Recent meals list
- User settings
- Add Meal Modal
- Edit Meal Screen
- Delete Confirmation Dialog
git clone https://github.com/harrywardy-cmd/calorie-compass.git
cd calorie-compassnpm installCreate a .env file:
DATABASE_URL="your-neon-database-url"Create a .env.local file:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_keynpx prisma db pushGenerate Prisma Client:
npx prisma generatenpm run devOpen:
http://localhost:3000
src/
├── app/
│ ├── dashboard/
│ ├── meals/
│ ├── settings/
│ ├── sign-in/
│ └── sign-up/
│
├── components/
│
├── generated/
│ └── prisma/
│
├── lib/
│ └── prisma.ts
│
└── prisma/
└── schema.prisma
- Daily calorie history
- Weekly trends and charts
- Monthly analytics
- AI meal analysis from photos
- Macro nutrient goals
- Weight tracking
- Streak system
- Achievement badges
- Mobile-friendly PWA support
This project helped me gain practical experience with:
- Next.js App Router
- Server Actions
- Authentication with Clerk
- Prisma ORM
- PostgreSQL databases
- Full CRUD operations
- Protected routes
- Responsive UI design
- TypeScript in production applications
The application is deployed using Vercel.
To deploy your own version:
vercelor connect your GitHub repository directly through the Vercel dashboard.
Harry Ward