SmartyDeck is an intelligent quiz generation platform that uses AI to transform any content into interactive quizzes and flashcards, helping users learn faster and remember longer.
- AI-Powered Quiz Generation: Upload any text or document and instantly create customized quizzes tailored to your learning needs.
- Multiple Question Types: Support for multiple choice, multi-select, true/false, and matching questions.
- Adaptive Learning: The system adapts to your performance, focusing more on areas where you need improvement.
- Progress Tracking: Track your learning progress over time with detailed analytics and insights.
- User Management: Admin panel for managing users and invite codes.
- Responsive Design: Works on desktop, tablet, and mobile devices.
- Node.js (v18 or higher)
- MongoDB (v4.4 or higher)
- Claude API key (from Anthropic)
- Clone the repository
git clone https://github.com/yourusername/smartydeck.git
cd smartydeck- Install dependencies
npm install- Environment setup
Create a .env file in the root directory with the following variables:
MONGO_URI=mongodb://localhost:27017/
MONGO_DB=SmartyDeck2
MONGO_USER=admin
MONGO_PASSWORD=password
JWT_SECRET=your_jwt_secret_key
CLAUDE_API_KEY=your_claude_api_key
- Create an admin user
npm run create-admin admin@example.com adminuser password- Start the development server
npm run dev- Build for production
npm run build- Start the production server
npm run start-
POST /api/auth/register: Register a new user
- Body:
{ email, username, password, inviteCode } - Response:
{ success, user }
- Body:
-
POST /api/auth/login: Login a user
- Body:
{ email, password } - Response:
{ success, user, token }
- Body:
-
GET /api/auth/me: Get current user info
- Headers:
Authorization: Bearer {token} - Response:
{ success, user }
- Headers:
-
POST /api/auth/refresh: Refresh authentication token
- Headers:
Authorization: Bearer {token} - Response:
{ success, user, token }
- Headers:
-
POST /api/quiz/generate: Generate a quiz using AI
- Headers:
Authorization: Bearer {token} - Body:
{ content, questionTypes, questionCounts, instructions } - Response:
{ success, quiz }
- Headers:
-
GET /api/quiz: Get all quizzes for the current user
- Headers:
Authorization: Bearer {token} - Response:
{ success, quizzes }
- Headers:
-
POST /api/quiz: Create a new quiz
- Headers:
Authorization: Bearer {token} - Body:
{ title, description, questions, tags, isPublic } - Response:
{ success, quiz }
- Headers:
-
GET /api/quiz/:id: Get a specific quiz
- Headers:
Authorization: Bearer {token} - Response:
{ success, quiz }
- Headers:
-
PUT /api/quiz/:id: Update a quiz
- Headers:
Authorization: Bearer {token} - Body:
{ title, description, questions, tags, isPublic } - Response:
{ success, quiz }
- Headers:
-
DELETE /api/quiz/:id: Delete a quiz
- Headers:
Authorization: Bearer {token} - Response:
{ success, message }
- Headers:
-
POST /api/quiz/results: Save quiz practice results
- Headers:
Authorization: Bearer {token} - Body:
{ quizId, answers, score, timeSpent } - Response:
{ success, message }
- Headers:
- GET /api/user/activity: Get user activity history
- Headers:
Authorization: Bearer {token} - Response:
{ success, activities }
- Headers:
-
GET /api/admin/invite-codes: Get all invite codes
- Headers:
Authorization: Bearer {token}(admin only) - Response:
{ success, inviteCodes }
- Headers:
-
POST /api/admin/invite-codes: Generate new invite codes
- Headers:
Authorization: Bearer {token}(admin only) - Body:
{ count, expiresInDays, maxUses, customCode } - Response:
{ success, inviteCodes }
- Headers:
-
GET /api/admin/invite-codes/:id: Get a specific invite code
- Headers:
Authorization: Bearer {token}(admin only) - Response:
{ success, inviteCode }
- Headers:
-
PATCH /api/admin/invite-codes/:id: Update an invite code
- Headers:
Authorization: Bearer {token}(admin only) - Body:
{ isUsed, expiresAt, maxUses } - Response:
{ success, inviteCode }
- Headers:
-
GET /api/admin/invite-codes/:id/users: Get users who used an invite code
- Headers:
Authorization: Bearer {token}(admin only) - Response:
{ success, users }
- Headers:
-
GET /api/admin/users: Get all users
- Headers:
Authorization: Bearer {token}(admin only) - Response:
{ success, users }
- Headers:
-
PATCH /api/admin/users/:id: Update a user
- Headers:
Authorization: Bearer {token}(admin only) - Body:
{ email, role, password, expiresAt } - Response:
{ success, user }
- Headers:
smartydeck/
βββ assets/ # Static assets
βββ components/ # Vue components
βββ middleware/ # Nuxt middleware
βββ pages/ # Application pages
βββ public/ # Public files
βββ scripts/ # Utility scripts
βββ server/ # Server-side code
β βββ api/ # API endpoints
β βββ config/ # Server configuration
β βββ models/ # Mongoose models
β βββ utils/ # Server utilities
βββ stores/ # Pinia stores
βββ .env # Environment variables
βββ .env.example # Example environment variables
βββ nuxt.config.ts # Nuxt configuration
βββ package.json # Project dependencies
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
- Frontend: Vue.js, Nuxt.js, Tailwind CSS, Pinia
- Backend: Node.js, Express.js, MongoDB, Mongoose
- AI: Claude API by Anthropic
- Authentication: JWT (JSON Web Tokens)
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- 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