{"id":42014442,"url":"https://github.com/devriazul/quiz_app_next.js_node","last_synced_at":"2026-01-26T02:47:44.894Z","repository":{"id":299464009,"uuid":"1003130606","full_name":"devriazul/quiz_app_next.js_node","owner":"devriazul","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-16T17:41:51.000Z","size":101,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-16T18:28:14.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://quiz-eosin-tau.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devriazul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-16T17:08:50.000Z","updated_at":"2025-06-16T17:41:55.000Z","dependencies_parsed_at":"2025-06-16T18:28:31.367Z","dependency_job_id":null,"html_url":"https://github.com/devriazul/quiz_app_next.js_node","commit_stats":null,"previous_names":["devriazul/quiz_app_next.js_node"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devriazul/quiz_app_next.js_node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devriazul%2Fquiz_app_next.js_node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devriazul%2Fquiz_app_next.js_node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devriazul%2Fquiz_app_next.js_node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devriazul%2Fquiz_app_next.js_node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devriazul","download_url":"https://codeload.github.com/devriazul/quiz_app_next.js_node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devriazul%2Fquiz_app_next.js_node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28765391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T02:25:41.078Z","status":"ssl_error","status_checked_at":"2026-01-26T02:24:28.809Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-26T02:47:43.947Z","updated_at":"2026-01-26T02:47:44.889Z","avatar_url":"https://github.com/devriazul.png","language":"TypeScript","readme":"# Quiz Application\n\nA modern, full-stack quiz application built with Next.js, TypeScript, and Prisma. This application allows users to take timed quizzes with both multiple-choice and short-answer questions.\n\n## Features\n\n- 🔐 **Authentication System**\n  - Email-based user registration and login\n  - JWT token-based authentication\n  - Secure password hashing with bcrypt\n\n- 📊 **Quiz Dashboard**\n  - Clean, modern interface\n  - Real-time score tracking\n  - Progress indicators\n  - User profile display\n\n- ⏱️ **Timed Exams**\n  - 10-minute countdown timer\n  - Auto-submission when time expires\n  - Progress tracking\n  - Multiple question types support\n\n- 📝 **Question Types**\n  - Multiple choice questions\n  - Short answer questions\n  - Immediate answer validation\n\n- 📈 **Results \u0026 Analytics**\n  - Score calculation\n  - Performance visualization\n  - Detailed result breakdown\n  - Option to retake quizzes\n\n## Tech Stack\n\n- **Frontend**\n  - Next.js 15.3.3\n  - TypeScript\n  - Tailwind CSS\n  - React Hooks\n\n- **Backend**\n  - Next.js API Routes\n  - Prisma ORM\n  - SQLite Database\n  - JWT Authentication\n\n- **Development Tools**\n  - Turbopack\n  - Prisma Studio\n  - TypeScript\n  - ESLint\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js (v18 or higher)\n- npm or yarn\n- Git\n\n### Installation\n\n1. Clone the repository:\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd quiz-application\n   ```\n\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n\n3. Set up environment variables:\n   Create a `.env` file in the root directory with the following variables:\n   ```\n   DATABASE_URL=\"file:./prisma/dev.db\"\n   JWT_SECRET=\"your-secret-key\"\n   ```\n\n4. Initialize the database:\n   ```bash\n   npx prisma migrate dev\n   ```\n\n5. Start the development server:\n   ```bash\n   npm run dev\n   ```\n\nThe application will be available at `http://localhost:3000`\n\n## Project Structure\n\n```\n├── src/\n│   ├── app/\n│   │   ├── api/\n│   │   │   ├── auth/\n│   │   │   │   ├── login/\n│   │   │   │   └── register/\n│   │   │   └── results/\n│   │   ├── dashboard/\n│   │   ├── exam/\n│   │   └── results/\n│   └── components/\n├── prisma/\n│   ├── schema.prisma\n│   └── migrations/\n├── public/\n└── package.json\n```\n\n## Database Schema\n\nThe application uses the following data models:\n\n- **User**\n  - id (Int, auto-increment)\n  - email (String, unique)\n  - password (String, hashed)\n  - createdAt (DateTime)\n  - updatedAt (DateTime)\n\n- **Quiz**\n  - id (String, UUID)\n  - title (String)\n  - questions (JSON)\n  - createdAt (DateTime)\n  - updatedAt (DateTime)\n\n- **QuizAttempt**\n  - id (String, UUID)\n  - userId (Int, foreign key)\n  - quizId (String, foreign key)\n  - answers (JSON)\n  - score (Int)\n  - createdAt (DateTime)\n\n## API Endpoints\n\n### Authentication\n- `POST /api/auth/register` - Register a new user\n- `POST /api/auth/login` - Login user\n- `POST /api/auth/verify` - Verify JWT token\n\n### Quiz\n- `GET /api/quiz` - Get quiz details\n- `POST /api/results` - Submit quiz results\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments\n\n- Next.js team for the amazing framework\n- Prisma team for the excellent ORM\n- Tailwind CSS for the utility-first CSS framework\n\n## Microservices with Event-Driven Architecture (EDA) Use Case\n\n### Quiz Application as a Microservice Architecture\n\nThis quiz application can be extended to demonstrate a practical use case of microservices with Event-Driven Architecture (EDA). Here's how the system could be structured:\n\n#### Microservices Breakdown:\n\n1. **Authentication Service**\n   - Handles user registration and login\n   - Manages JWT token generation and validation\n   - Publishes events: `UserRegistered`, `UserLoggedIn`\n\n2. **Quiz Service**\n   - Manages quiz content and questions\n   - Handles quiz session creation\n   - Publishes events: `QuizStarted`, `QuizCompleted`\n\n3. **Timer Service**\n   - Manages quiz time limits\n   - Tracks remaining time\n   - Publishes events: `TimeWarning`, `TimeExpired`\n\n4. **Results Service**\n   - Processes quiz submissions\n   - Calculates scores\n   - Publishes events: `ResultsCalculated`, `ResultsReady`\n\n5. **Notification Service**\n   - Sends notifications to users\n   - Handles email/SMS notifications\n   - Subscribes to events: `ResultsReady`, `TimeWarning`\n\n#### Event Flow Example:\n\n1. When a user starts a quiz:\n   ```\n   Quiz Service → QuizStarted → Timer Service starts countdown\n   ```\n\n2. When time is running low:\n   ```\n   Timer Service → TimeWarning → Notification Service sends warning\n   ```\n\n3. When quiz is completed:\n   ```\n   Quiz Service → QuizCompleted → Results Service processes answers\n   Results Service → ResultsCalculated → Notification Service sends results\n   ```\n\n#### Benefits of this Architecture:\n\n1. **Scalability**\n   - Each service can be scaled independently\n   - High-traffic services (like Quiz Service) can be scaled up during peak times\n\n2. **Resilience**\n   - Service failures are isolated\n   - Event queue ensures no data loss during service downtime\n\n3. **Flexibility**\n   - New features can be added by creating new services\n   - Existing services can be modified without affecting others\n\n4. **Real-time Processing**\n   - Events enable real-time updates across services\n   - Users get immediate feedback on their actions\n\n#### Technology Stack for EDA:\n\n- **Message Broker**: Apache Kafka or RabbitMQ\n- **Service Communication**: gRPC or REST\n- **Event Store**: EventStoreDB\n- **API Gateway**: Kong or AWS API Gateway\n- **Service Discovery**: Consul or Eureka\n- **Container Orchestration**: Kubernetes\n\nThis architecture allows the quiz application to handle high loads, provide real-time feedback, and maintain system reliability while enabling future scalability and feature additions.\n\n# quiz_app_next.js_node\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevriazul%2Fquiz_app_next.js_node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevriazul%2Fquiz_app_next.js_node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevriazul%2Fquiz_app_next.js_node/lists"}