A beautiful, modern mobile-first web application for learning aerial yoga. Track your progress, connect with the community, and master aerial yoga tricks at your own pace.
β¨ Features
π Home & Daily Trick
- Daily Trick: A new randomly selected tutorial every day at midnight
- Difficulty Levels: Easy, Intermediate, Advanced, and Drop
- Favorites System: Save your favorite tutorials for quick access
- Smart Organization: Tutorials organized by difficulty with favorites section
- Social Feed: Share photos and videos of your practice
- Q&A: Ask questions and help others
- Interactions: Like and comment on community posts
- Real-time Updates: See the latest posts from the community
π Progress Tracking
- Comprehensive Stats: Track minutes practiced, videos completed, days practiced, and current streak
- Points System: Earn points based on tutorial difficulty and duration
- Achievements: Unlock badges for milestones (First Flight, Week Warrior, etc.)
- Progress Photos: Upload photos at key milestones (Day 1, 1 month, 3 months, 6 months, 1 year)
- Visual Transformation: Compare your progress over time
β Favorites
- Dedicated tab for all your favorite tutorials
- One-tap access to tutorials you love
- Synced across sessions
π€ Profile
- View and edit your profile
- See your complete stats summary
- Access admin portal
- Secure logout
π§ Admin Portal
- Upload tutorial videos with auto-thumbnail generation
- Add tutorial metadata (title, description, difficulty, duration, collection)
- Edit and delete existing tutorials
- Drag-and-drop file uploads
π― Smart Features
- Auto-thumbnail: Automatically generates thumbnails from uploaded videos
- Points System: Dynamic points based on difficulty and duration
- Streak Tracking: Maintains practice streaks with daily check-ins
- Motivational Messages: AI-generated encouragement after completing tutorials
- Video Comments: Engage with tutorials through comments
π Tech Stack
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- Storage: Supabase Storage
- AI: OpenAI GPT-3.5
- Icons: Lucide React
- Deployment: Vercel (recommended)
π Prerequisites
- Node.js 18+
- npm or yarn
- Supabase account
- OpenAI API key (optional, has fallback)
π οΈ Setup Instructions
1. Clone the Repository
git clone <your-repo-url>
cd aerial-trick
2. Install Dependencies
3. Set Up Supabase
- Create a new project at supabase.com
- Go to SQL Editor and run the schema from
supabase/schema.sql
- Set up Storage Buckets (see
supabase/storage-buckets.md):
- tutorials (public)
- posts (public)
- progress-photos (public)
Create a .env.local file in the root directory:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Optional: Service role key for admin operations
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# OpenAI Configuration (optional - has fallback messages)
OPENAI_API_KEY=your_openai_api_key
# Optional: Cron job security
CRON_SECRET=your_random_secret_string
5. Run the Development Server
Open http://localhost:3000 in your browser.
π± Usage
For Users
- Sign Up: Create an account at
/auth/login
- Browse Tutorials: Explore tutorials by difficulty level
- Watch & Learn: Complete tutorials to earn points and track progress
- Connect: Share your practice and engage with the community
- Track Progress: Upload progress photos and view your stats
For Admins
- Navigate to Profile β Admin Portal
- Click Add New Tutorial
- Fill in tutorial details and upload video
- Thumbnail auto-generates from video (or upload custom)
- Manage existing tutorials (edit/delete)
π Daily Trick Cron Job
The app uses a cron job to select a new βDaily Trickβ every day at midnight.
Vercel Deployment (Automatic)
The vercel.json file configures automatic daily cron execution on Vercel.
Manual Trigger
You can manually trigger the daily trick update:
curl -X GET https://your-domain.com/api/cron/daily-trick \
-H "Authorization: Bearer YOUR_CRON_SECRET"
Alternative Cron Services
If not using Vercel, set up a cron job with:
- GitHub Actions
- AWS EventBridge
- Render Cron Jobs
- Any external cron service
Schedule: 0 0 * * * (Daily at midnight UTC)
π¨ Design Philosophy
This app is built with a mobile-first approach, focusing on:
- Clean, modern UI with smooth animations
- Intuitive navigation with bottom tab bar
- Beautiful gradients and color schemes
- Touch-friendly interactions
- Fast loading and responsive design
ποΈ Project Structure
aerial-trick/
βββ app/
β βββ api/ # API routes
β β βββ motivation/ # OpenAI motivational messages
β β βββ daily-trick/ # Daily trick management
β β βββ cron/ # Cron job endpoints
β βββ auth/ # Authentication pages
β βββ admin/ # Admin portal
β βββ tutorial/ # Tutorial detail pages
β βββ community/ # Community feed
β βββ progress/ # Progress tracking
β βββ favorites/ # Favorites list
β βββ profile/ # User profile
β βββ page.tsx # Home page
βββ components/ # React components
βββ lib/
β βββ supabase/ # Supabase client setup
β βββ types/ # TypeScript types
β βββ utils.ts # Utility functions
βββ supabase/ # Database schema & config
βββ public/ # Static assets
π Security Features
- Row Level Security (RLS) on all Supabase tables
- Secure authentication with Supabase Auth
- Protected API routes
- Cron job authentication
- Client-side and server-side validation
π― Future Enhancements
π License
MIT License - feel free to use this project for learning or your own aerial yoga platform!
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
π§ Support
For questions or issues, please open an issue on GitHub.
Built with π for the aerial yoga community