Learning-first nutrition tracking webapp built with Next.js, TypeScript, and Supabase.
First, install dependencies:
npm installThen, run the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
app/- Next.js App Router (routes and features)components/- Shared React componentslib/- Utilities and business logiclib/theme/- Chakra UI theme configuration
public/- Static assets
This project uses Chakra UI as the design system.
The custom theme is configured in lib/theme/index.ts and includes:
- Colors: Custom color palette (primary teal, secondary coral, semantic colors)
- Typography: System UI font stack with responsive type scale
- Spacing: 8px base unit for consistent spacing
- Components: Customized button, heading, and text styles
Chakra UI components can be imported and used throughout the application:
import { Button, Box, Text } from '@chakra-ui/react'
export default function MyComponent() {
return (
<Box p={4}>
<Text>Hello World</Text>
<Button colorScheme="primary">Click me</Button>
</Box>
)
}- Primary: Teal (#00B4A6) - Main brand color
- Secondary: Coral (#FF6B6B) - Accent color
- Semantic: Success (green), Warning (amber), Error (red), Info (blue)
- Neutral: Gray scale for text and backgrounds
See lib/theme/index.ts for complete theme configuration.
Copy .env.example to .env.local and fill in the values:
NEXT_PUBLIC_SUPABASE_URL- Supabase project URLNEXT_PUBLIC_SUPABASE_ANON_KEY- Supabase anonymous keyOPENAI_API_KEY- OpenAI API key for LLM integration
This project is configured for deployment on Vercel.
- Git repository (initialized and committed)
- Vercel account (sign up)
-
Push to Git Repository
# If using GitHub/GitLab/Bitbucket, push your code: git remote add origin <your-repo-url> git push -u origin master
-
Create Vercel Project
- Go to Vercel Dashboard
- Click "Add New Project"
- Import your Git repository
- Vercel will auto-detect Next.js
-
Configure Environment Variables In Vercel project settings, add these environment variables:
NEXT_PUBLIC_SUPABASE_URL- Your Supabase project URLNEXT_PUBLIC_SUPABASE_ANON_KEY- Your Supabase anonymous keyOPENAI_API_KEY- (Optional) OpenAI API key for future LLM features
-
Deploy
- Vercel will automatically deploy on every push to your main branch
- Preview deployments are created for pull requests
- Your app will be available at
https://your-project.vercel.app
- Framework Preset: Next.js (auto-detected)
- Build Command:
next build(default) - Output Directory:
.next(default) - Node.js Version: 18.x or 20.x (compatible with Next.js 15)
All environment variables must be configured in the Vercel dashboard:
- Go to Project Settings → Environment Variables
- Add variables for Production, Preview, and Development environments
- Variables prefixed with
NEXT_PUBLIC_are exposed to the browser - Never commit
.env.localfiles to Git
For more information, see Vercel Documentation.