A full-stack application built with Next.js, Supabase, and Tailwind CSS to help developers prepare for frontend interviews through interactive flashcards and coding challenges.
- Review fundamental frontend concepts
- Toggle between question and answer
- Filter by difficulty (Easy, Medium, Hard)
- Filter by tags (JavaScript, React, CSS, etc.)
- Search functionality
- Practice coding problems with Monaco Editor
- Real-time code editing with syntax highlighting
- Mock test runner with sample inputs/outputs
- Difficulty-based filtering
- View solutions after attempts
- User registration and login via Supabase Auth
- Protected routes and user sessions
- Email verification workflow
- Responsive design with Tailwind CSS
- Clean and intuitive interface
- Loading states and error handling
- Mobile-friendly navigation
- Google AdSense integration with responsive ad units
- Strategic ad placement between content
- Graceful fallbacks for development environment
- Non-intrusive ad experience
- Frontend: Next.js 15 (App Router), TypeScript, Tailwind CSS
- Backend: Supabase (PostgreSQL, Auth, Real-time)
- Code Editor: Monaco Editor
- Deployment: Vercel + Supabase
- Icons: Lucide React
id(UUID, Primary Key)question(Text)answer(Text)tags(Text Array)difficulty(Enum: easy, medium, hard)created_at,updated_at(Timestamps)
id(UUID, Primary Key)title(Text)description(Text)difficulty(Enum: easy, medium, hard)starter_code(Text)solution(Text)test_cases(JSONB Array)created_at,updated_at(Timestamps)
- Node.js 18+
- npm or yarn
- Supabase account
git clone <your-repo-url>
cd fe-prep
npm install- Create a new Supabase project at supabase.com
- Go to Settings β API to get your project URL and anon key
- Copy
.env.local.exampleto.env.local:
cp .env.local.example .env.local- Update
.env.localwith your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url_here
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key_here
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key_here
NEXT_PUBLIC_ADSENSE_CLIENT_ID=ca-pub-your-adsense-publisher-id- Create a Google AdSense account at adsense.google.com
- Get your publisher ID (starts with
ca-pub-) - Update the
NEXT_PUBLIC_ADSENSE_CLIENT_IDin your.env.local - Create ad units in your AdSense dashboard and replace the placeholder ad slot IDs in the code
- AdSense ads will only show in production - in development, you'll see placeholder boxes
Note: The app works perfectly without AdSense configuration - ads will show as placeholder boxes during development.
Run the SQL commands in supabase-schema.sql in your Supabase SQL editor to create:
- Tables for flashcards and challenges
- Sample data
- Row Level Security policies
- Database indexes
npm run devOpen http://localhost:3000 to view the app.
src/
βββ app/ # Next.js App Router pages
β βββ auth/ # Authentication pages
β βββ flashcards/ # Flashcards page
β βββ challenges/ # Code challenges page
β βββ page.tsx # Home page
βββ components/ # Reusable UI components
β βββ ui/ # Base UI components (Button, Card, etc.)
β βββ layout.tsx # Main app layout
β βββ flashcard.tsx # Flashcard component
β βββ challenge.tsx # Challenge component
β βββ code-editor.tsx # Monaco editor wrapper
β βββ filter-bar.tsx # Filtering component
βββ lib/ # Utility functions and config
β βββ supabase/ # Supabase client config
β βββ utils.ts # Utility functions
βββ types/ # TypeScript type definitions
βββ database.ts # Database and app types
- Push your code to GitHub
- Connect your GitHub repo to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on every push to main
Make sure your Supabase project is configured with:
- Row Level Security enabled
- Public read access policies for flashcards/challenges tables
- Auth settings configured for your domain
Add entries to the flashcards table via Supabase dashboard or SQL:
insert into flashcards (question, answer, tags, difficulty) values
('Your question here', 'Your answer here', '{"tag1", "tag2"}', 'medium');Add entries to the challenges table:
insert into challenges (title, description, difficulty, starter_code, solution, test_cases) values
('Challenge Title', 'Description...', 'hard', 'function starter() {}', 'function solution() {}',
'[{"input": "example", "expected_output": "result", "description": "test case"}]');- Modify components in
src/components/ - Update styling with Tailwind classes
- Customize colors and themes in
tailwind.config.js
- User progress tracking
- Difficulty progression system
- Code challenge submission history
- More programming languages support
- Timed practice sessions
- Community-contributed content
- Analytics dashboard
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is open source and available under the MIT License.
For issues and questions:
- Check existing GitHub issues
- Create a new issue with detailed description
- Include error messages and environment details