aerial-trick

πŸ§˜β€β™€οΈ Aerial Trick - Aerial Yoga Learning Platform

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

πŸ‘₯ Community

πŸ“Š Progress Tracking

⭐ Favorites

πŸ‘€ Profile

πŸ”§ Admin Portal

🎯 Smart Features

πŸš€ Tech Stack

πŸ“‹ Prerequisites

πŸ› οΈ Setup Instructions

1. Clone the Repository

git clone <your-repo-url>
cd aerial-trick

2. Install Dependencies

npm install

3. Set Up Supabase

  1. Create a new project at supabase.com
  2. Go to SQL Editor and run the schema from supabase/schema.sql
  3. Set up Storage Buckets (see supabase/storage-buckets.md):
    • tutorials (public)
    • posts (public)
    • progress-photos (public)

4. Configure Environment Variables

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

npm run dev

Open http://localhost:3000 in your browser.

πŸ“± Usage

For Users

  1. Sign Up: Create an account at /auth/login
  2. Browse Tutorials: Explore tutorials by difficulty level
  3. Watch & Learn: Complete tutorials to earn points and track progress
  4. Connect: Share your practice and engage with the community
  5. Track Progress: Upload progress photos and view your stats

For Admins

  1. Navigate to Profile β†’ Admin Portal
  2. Click Add New Tutorial
  3. Fill in tutorial details and upload video
  4. Thumbnail auto-generates from video (or upload custom)
  5. 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:

Schedule: 0 0 * * * (Daily at midnight UTC)

🎨 Design Philosophy

This app is built with a mobile-first approach, focusing on:

πŸ—οΈ 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

🎯 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