A full-stack vocabulary learning application built with React, Node.js, Express, Prisma, and MongoDB. The app allows users to upload German vocabulary with English and Bengali translations, take quizzes, and track their learning progress.
- User Authentication: Simple login/register system with session-based authentication
- Vocabulary Upload: Bulk upload vocabulary in the format:
German - English - Bengali - Vocabulary Table: View all uploaded vocabulary with mistake tracking
- Interactive Quiz: Test your knowledge with random questions
- Progress Tracking: View statistics and most mistaken words
- Responsive Design: Modern UI built with Tailwind CSS
- React 18 with Vite
- Tailwind CSS for styling
- React Router for navigation
- Native fetch API for HTTP requests
- Node.js with Express.js
- Prisma ORM for database operations
- MongoDB as the database
- Session-based authentication
- bcryptjs for password hashing
- Node.js (v16 or higher)
- MongoDB (local installation or MongoDB Atlas)
- npm or yarn
git clone <repository-url>
cd vocabulary-appcd backend
# Install dependencies
npm install
# Create .env file
echo "DATABASE_URL=\"mongodb://localhost:27017/vocabulary-app\"
SESSION_SECRET=\"your-super-secret-session-key-change-this-in-production\"
PORT=5000" > .env
# Generate Prisma client
npm run db:generate
# Push schema to database
npm run db:push
# Start the development server
npm run devcd frontend
# Install dependencies
npm install
# Start the development server
npm run dev- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
POST /api/auth/register- Register a new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout userGET /api/auth/me- Get current user info
POST /api/vocab/upload- Upload vocabulary (bulk)GET /api/vocab/list- Get user's vocabulary list
GET /api/quiz/next- Get next quiz questionPOST /api/quiz/answer- Submit quiz answer
GET /api/stats- Get user statistics and progress
model User {
id String @id @default(auto()) @map("_id") @db.ObjectId
username String @unique
password String
vocabs Vocab[]
}model Vocab {
id String @id @default(auto()) @map("_id") @db.ObjectId
german String
english String
bengali String
userId String @db.ObjectId
user User @relation(fields: [userId], references: [id])
mistakes Int @default(0)
createdAt DateTime @default(now())
}- Register/Login: Create an account or login with existing credentials
- Upload Vocabulary: Go to the Upload page and paste vocabulary in the specified format
- View Vocabulary: Check your uploaded words in the Vocabulary table
- Take Quizzes: Test your knowledge with interactive quizzes
- Track Progress: Monitor your learning progress and identify areas for improvement
Enter vocabulary in the following format (one word per line):
Kommen - To come - আসা
Laufen - To run - দৌড়ানো
Essen - To eat - খাওয়া
cd backend
npm run dev # Start with nodemon for auto-reload
npm run db:studio # Open Prisma Studio for database managementcd frontend
npm run dev # Start Vite development server
npm run build # Build for productionCreate a .env file in the backend directory:
DATABASE_URL="mongodb://localhost:27017/vocabulary-app"
SESSION_SECRET="your-super-secret-session-key-change-this-in-production"
PORT=5000- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.