-
Notifications
You must be signed in to change notification settings - Fork 0
Quick Start Tutorial
Get up and running with My Progress Planner in just 5 minutes! This tutorial will walk you through setting up the application and logging your first meal.
# Clone the repository
git clone https://github.com/dinesh-git17/my-progress-planner.git
cd my-progress-planner
# Install dependencies
npm install-
Copy environment template:
cp .env.example .env.local
-
Get your Supabase credentials:
- Go to supabase.com and create a new project
- Navigate to Settings β API
- Copy your
URLandanonkey
-
Get your OpenAI API key:
- Go to platform.openai.com
- Create an API key (starts with
sk-)
-
Update
.env.local:NEXT_PUBLIC_SUPABASE_URL=your_supabase_url_here NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key_here SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here OPENAI_API_KEY=your_openai_api_key_here
# Set up database schema
npm run db:setup# Start the development server
npm run devVisit http://localhost:3000 - you should see the welcome screen! π
- Click "Get Started" on the homepage
- Choose "Sign in with Google" or create an account with email
- Complete the authentication flow
- You'll see the main dashboard with three meal cards
- Click on the Breakfast card
- Enter what you had for breakfast (e.g., "Oatmeal with berries and honey")
- Click "Log Meal"
- Wait a moment for GPT-4 to generate a personalized response
- You'll see an encouraging message like: "What a nutritious start to your day! Oatmeal with berries is such a perfect combination of fiber and antioxidants. Hope your morning is as sweet as you are! π"
- Notice the streak counter showing "1 day"
- This will grow as you consistently log meals!
- Try logging lunch and dinner
- Check the Summaries page for daily recaps
- Test the offline functionality by disconnecting internet
Congratulations! You now have a fully functional meal tracking app with:
- β AI-Powered Responses - Every meal gets personalized encouragement
- β Streak Tracking - Motivation through consistency
- β Offline Support - Works without internet connection
- β Daily Summaries - AI-generated progress recaps
- β Secure Authentication - Your data is private and protected
-
Set Your Name:
# Go to profile settings http://localhost:3000/profile -
Generate Friend Code:
# Share progress with friends http://localhost:3000/friends -
Enable Push Notifications:
- Set up VAPID keys (optional)
- Configure meal reminders
# Create a feature branch
git checkout -b feature/my-improvement
# Make your changes
# Test thoroughly
# Commit and push
git commit -m "feat: add awesome feature"
git push origin feature/my-improvement# Run tests
npm test
# Type checking
npm run type-check
# Linting
npm run lint# Create production build
npm run build
# Test production build locally
npm start- Hot Reload: Changes to code automatically refresh the browser
-
Database Reset: Use
npm run db:resetif you need to start fresh -
Clear Cache: Run
npm run cleanif you encounter build issues
// Change the app's primary color in tailwind.config.ts
module.exports = {
theme: {
extend: {
colors: {
primary: {
500: '#your-color-here', // Change this
}
}
}
}
}// Customize AI responses in src/lib/ai-prompts.ts
export const mealPrompts = {
breakfast: "Your custom breakfast encouragement template...",
lunch: "Your custom lunch encouragement template...",
dinner: "Your custom dinner encouragement template..."
};# Kill process on port 3000
lsof -ti:3000 | xargs kill -9
# Or use different port
npm run dev -- -p 3001# Verify Supabase URL format
https://your-project-id.supabase.co
# Check if keys are correctly set
echo $NEXT_PUBLIC_SUPABASE_URL# Verify API key format (should start with sk-)
echo $OPENAI_API_KEY | grep "^sk-"
# Test API key
curl https://api.openai.com/v1/models \
-H "Authorization: Bearer $OPENAI_API_KEY"-
Chrome/Edge:
- Click the install icon in the address bar
- Or go to Settings β "Install My Progress Planner"
-
Safari (iOS):
- Tap the Share button
- Select "Add to Home Screen"
-
Test Offline:
- Disconnect from internet
- Try logging a meal
- Reconnect - data should sync automatically
# Generate VAPID keys for push notifications
npx web-push generate-vapid-keys
# Add to .env.local
VAPID_PUBLIC_KEY=your_public_key
VAPID_PRIVATE_KEY=your_private_key/* Add to src/app/globals.css */
:root {
--color-primary: #your-color;
--color-background: #your-bg-color;
}// Modify src/types/meal.ts
export type MealType = 'breakfast' | 'lunch' | 'dinner' | 'snack';// Edit src/lib/ai-config.ts
export const AI_PERSONALITY = {
tone: "encouraging", // supportive, playful, professional
style: "boyfriend", // friend, coach, parent
emojis: true // false to disable emojis
};By the end of this tutorial, you should have:
- App running on
localhost:3000 - Successfully logged in with authentication
- Logged at least one meal
- Received an AI response
- Seen your streak counter
- Tested offline functionality
- Installed the app as PWA (optional)
If you get stuck at any point:
- Check the logs in your terminal for error messages
- Review the Installation Guide for detailed setup
- Search GitHub Issues for similar problems
- Ask for help in GitHub Discussions
-
Contact directly:
[email protected]
You've successfully set up My Progress Planner! You now have a powerful, AI-enhanced meal tracking application that will provide supportive encouragement on your wellness journey.
What's Next?
- Explore the System Architecture to understand how it works
- Read the Contributing Guide to contribute improvements
- Check out the Roadmap to see what's coming next
Happy meal tracking! Remember, every meal logged is a step towards building healthier habits. You've got this! π