A modern, web-based flash card study platform built with Next.js 14, Supabase, and Tailwind CSS.
- 🎯 Smart Flash Cards - Create beautiful flash cards with markdown support
- 👥 Collaboration - Share decks with friends or explore community creations
- 📊 Progress Tracking - Monitor your learning with detailed stats and analytics
- ✨ Beautiful Design - Enjoy a delightful, distraction-free studying experience
- 📱 Responsive - Works seamlessly on desktop, tablet, and mobile
- ⌨️ Keyboard Shortcuts - Navigate efficiently with keyboard controls
- Framework: Next.js 14 (App Router)
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- Styling: Tailwind CSS
- State Management: Zustand + React Query
- Forms: React Hook Form + Zod
- Animations: Framer Motion
- Drag & Drop: dnd-kit
- Markdown: React Markdown + remark-gfm
- Node.js 18+ and npm
- A Supabase account (free tier available)
npm install- Create a new project at supabase.com
- Go to Project Settings > API to get your credentials
- Copy
.env.local.exampleto.env.local:
cp .env.local.example .env.local- Add your Supabase credentials to
.env.local:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_keyIn your Supabase project dashboard:
- Go to the SQL Editor
- Copy the contents of
supabase/migrations/20260717000000_initial_schema.sql - Paste and run the SQL
This will create:
- Users table
- Decks table
- Cards table
- Study sessions table
- Row-level security policies
- Indexes for performance
npm run devOpen http://localhost:3000 in your browser.
flashcard-app/
├── app/ # Next.js App Router pages
│ ├── (auth)/ # Authentication pages (login, register)
│ ├── (dashboard)/ # Protected dashboard pages
│ │ ├── dashboard/ # Main dashboard
│ │ ├── decks/ # Deck management
│ │ ├── study/ # Study mode
│ │ └── profile/ # User profile
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Landing page
│ └── providers.tsx # React Query provider
├── components/ # React components
│ ├── auth/ # Auth forms
│ ├── dashboard/ # Dashboard components
│ ├── decks/ # Deck management components
│ ├── study/ # Study mode components
│ ├── profile/ # Profile components
│ └── ui/ # Reusable UI components
├── lib/ # Utility libraries
│ └── supabase/ # Supabase client setup
├── types/ # TypeScript type definitions
├── hooks/ # Custom React hooks
├── utils/ # Utility functions
├── supabase/ # Supabase configuration
│ └── migrations/ # Database migrations
└── middleware.ts # Next.js middleware for auth
- Go to Dashboard
- Click "Create Deck"
- Fill in deck name, description, and tags
- Choose privacy setting (Private, Unlisted, or Public)
- Click "Create Deck"
- Open a deck and click "Edit"
- Click "Add" to create a new card
- Enter front (question) and back (answer)
- Supports markdown formatting
- Optionally set difficulty level
- Drag to reorder cards
- Click "Save All" when done
- Open a deck and click "Study Now"
- Click card or press Space to flip
- After viewing answer, mark as "Got It" or "Review Again"
- Use arrow keys to navigate
- Press Esc to exit
- View summary when session complete
Space/Enter- Flip card←- Previous card→- Next cardEsc- Exit study mode
- User profiles linked to Supabase auth
- Username, email, avatar
- Name, description, tags
- Privacy levels (private, unlisted, public)
- Owner relationship
- Front and back content (markdown)
- Optional images
- Difficulty tags
- Order index for sorting
- Tracks each study session
- Cards reviewed, correct count
- Duration and timestamp
# Required
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
# Optional (for admin features)
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run linter
npm run lint
# Format code
npm run format
# Type check
npm run type-check- Row-level security (RLS) policies
- JWT-based authentication
- HTTPS enforced in production
- Input validation with Zod
- XSS prevention via sanitized markdown
- Rate limiting ready
- Push your code to GitHub
- Import project in Vercel
- Add environment variables
- Deploy!
Vercel will automatically:
- Build your Next.js app
- Set up edge functions
- Configure CDN
- Enable automatic HTTPS
Supabase provides automatic daily backups. For production:
- Enable point-in-time recovery
- Set up monitoring and alerts
- Review security policies regularly
This is a learning project built from a PRD. Feel free to:
- Add new features
- Improve UI/UX
- Fix bugs
- Optimize performance
MIT License - feel free to use this project for learning or production.
For issues or questions:
- Check the Supabase documentation
- Review Next.js 14 App Router docs
- Open an issue in the repository
Built with ❤️ using Next.js, Supabase, and Tailwind CSS