A modern spaced repetition flashcard application built with React, TypeScript, and Express. Upload CSV files with flashcard data and study using an intelligent spaced repetition algorithm.
- CSV Upload: Upload flashcard data in "Clue Word, Explanation" format
- Spaced Repetition: Uses SM-2 algorithm for optimal learning
- Interactive Study Sessions: Flip cards and rate difficulty (Easy/Hard/Unable)
- Progress Tracking: Dashboard with statistics and progress visualization
- Persistent Storage: PostgreSQL database with Neon Database integration
- Modern UI: Clean interface built with shadcn/ui and Tailwind CSS
- React 18 with TypeScript
- Vite for build tooling
- shadcn/ui components (Radix UI + Tailwind CSS)
- TanStack Query for server state management
- Wouter for routing
- React Hook Form with Zod validation
- Express.js with TypeScript
- PostgreSQL database with Drizzle ORM
- Neon Database (serverless PostgreSQL)
- Multer for file uploads
- Express sessions for session management
- Node.js 18+
- PostgreSQL database (or Neon Database account)
- Clone the repository:
git clone <your-repo-url>
cd flashcard-pro- Install dependencies:
npm install- Set up environment variables:
cp .env.example .envAdd your database URL to the .env file:
DATABASE_URL=your_postgresql_connection_string
- Push the database schema:
npm run db:push- Start the development server:
npm run devThe application will be available at http://localhost:5000
- Prepare a CSV file with two columns: "Clue Word, Explanation"
- Navigate to the upload page
- Drag and drop or click to select your CSV file
- The system will create a study set with your flashcards
- From the dashboard, click "Study Now" on any study set
- Cards will be presented with the clue word first
- Click to flip and see the explanation
- Rate your recall: Easy, Hard, or Unable to Recall
- The spaced repetition algorithm will schedule the next review
- View all study sets with progress statistics
- See due cards count and mastery progress
- Access detailed study set information
- Start study sessions with one click
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── hooks/ # Custom React hooks
│ │ └── lib/ # Utility functions
├── server/ # Express backend
│ ├── index.ts # Server entry point
│ ├── routes.ts # API routes
│ ├── db.ts # Database connection
│ └── storage.ts # Data access layer
├── shared/ # Shared types and schemas
│ └── schema.ts # Database schema and types
└── package.json # Dependencies and scripts
The application uses four main tables:
- study_sets: Collections of flashcards
- flashcards: Individual flashcard data (clue word + explanation)
- study_cards: Progress tracking for each flashcard
- study_sessions: Study session metadata
npm run dev- Start development servernpm run build- Build for productionnpm run db:push- Push schema changes to databasenpm run db:studio- Open Drizzle Studio for database management
DATABASE_URL- PostgreSQL connection stringNODE_ENV- Environment (development/production)
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.