flashcard/
├── .github/ # GitHub Actions workflows
├── .husky/ # Git hooks
├── components/ # React components
├── docs/ # Documentation
├── models/ # Data models
├── pages/ # Next.js pages & API routes
├── public/ # Static assets
├── scripts/ # Utility scripts
├── styles/ # CSS styles
├── utils/ # Utility functions
├── .env.example # Environment variables template
├── next.config.js # Next.js configuration
├── package.json # Dependencies and scripts
└── tsconfig.json # TypeScript configuration
┌─────────────────┐ ┌──────────────┐ ┌─────────────┐
│ Frontend │ │ Next.js API │ │ Database │
│ (Next.js/React)│ ──► │ Routes │ ──► │ (MongoDB) │
└─────────────────┘ └──────────────┘ └─────────────┘
▲ ▲ ▲
│ │ │
│ ┌──────────┐ │
└────────────── │ NextAuth │ ───────────────┘
└──────────┘
/components
/auth # Authentication components
LoginForm.tsx
RegisterForm.tsx
/common # Shared components
ErrorBoundary.tsx
LoadingSpinner.tsx
/dashboard # Dashboard views
Stats.tsx
RecentDecks.tsx
/flashcards # Flashcard components
CardEditor.tsx
StudyMode.tsx
/layout # Layout components
Header.tsx
Navigation.tsx
/theme # Theme configuration
ThemeProvider.tsx
/pages/api
/auth # Authentication endpoints
[...nextauth].ts
register.ts
/decks # Deck management
index.ts
[id].ts
/flashcards # Flashcard operations
create.ts
update.ts
/stats # Statistics and progress
index.ts
/
├── components/ # React components
├── pages/ # Next.js pages
├── public/ # Static assets
├── styles/ # Global styles
├── utils/ # Utilities
└── lib/ # Core libraries