Example: https://quiz.rocketseat.com.br/quizzes/react
- Create account with Discord
- Create account with Google
- Create account with GitHub
- Create account with Magic Link
- Create Quiz
- Update Quiz
- Delete Quiz
- Play Quiz
- Like Quiz
- Dislike Quiz
- Comment Quiz
- Refactor database calls
- Create a seed script
- OpenGraph Image
- Migrate from Zod to Valibot (https://valibot.dev/guides/migrate-from-zod)
- Rate limiter (https://vercel.com/guides/rate-limiting-edge-middleware-vercel-kv)
Pytania is an interactive quiz application designed to provide users with an engaging and educational experience. Whether you're a student looking to reinforce your learning or just someone who enjoys testing their knowledge, Pytania has something for everyone.
- Login: Registered users can log in to access personalized features.
- Users can authenticate using OAuth with Discord, Google, and GitHub.
- Alternatively, users can authenticate using an email magic link.
- Guest Mode: Users can explore limited features without creating an account.
- Create Quiz: Authenticated users can create quizzes with a title, description, and a set of questions.
- Edit Quiz: Creators can modify the content of their quizzes.
- Delete Quiz: Creators can delete quizzes they no longer want.
- Change Quiz Visibility: Creators can change the visibility to public or private (visible only with link).
- Information Displayed:
- Name
- Bio
- Avatar
- Member since
- Number of public created quizzes.
- Public created quizzes.
- Favorite quizzes.
- Last 5 Quizzes Resolved.
- Start Quiz: Users can start a quiz, answering questions one by one.
- Timer: Quizzes may have a time limit for each question.
- Submit Answers: Users can submit their answers and receive immediate feedback.
- Social Features: Users can like, dislike, and comment on quizzes.
- View Results: Users can see their quiz results, including correct and incorrect answers.
- Score Calculation: The app calculates and displays the overall score.
- Response Time: The app should respond to user interactions within 2 seconds.
- Scalability: The system should handle a growing number of users and quizzes without performance degradation.
- Intuitive UI: The user interface should be user-friendly and easy to navigate.
- Accessibility: The app should be accessible to users with disabilities.
- Availability: The app should be available 99.9% of the time.
- Backup: Regular data backups to prevent data loss.
- Browser Compatibility: The app should work seamlessly on major web browsers.
- Device Compatibility: The app should be responsive and functional on various devices.
- Data Protection: The app should comply with data protection and privacy regulations.
- Accessibility Standards: The app should adhere to accessibility standards.
To run the Pytania app locally, follow these steps:
- Clone the repository.
- Install dependencies with
bun install
. - Configure all environment variables following the instructions on
.env.example
file. - Run all migrations with
bun db:migrate
. - Run the app with
bun dev
.
bun dev
: Run Next.js in development modebun run build
: Build the application for production usagebun start
: Run Next.js in production modebun lint
: Run ESLintbun db:generate
: Generate migrations based on all schemasbun db:migrate
: Run all migrations on databasebun db:drop
: Delete previously generated migrationsbun db:pull
: Pull DDL from database and generate a schemabun db:studio
: Run Drizzle Studio, a tool to explore the databasebun db:check
: Check consistency of your migrationsbun db:start
: Start and restart the Postgres database defined indocker-compose.yml
bun db:rm
: Stop and remove the databasebun email
: Starts a local development server on port 3001 to preview all email templates.
This project is licensed under the MIT License. Feel free to fork, modify, and distribute the code for educational purposes.
Feel free to expand or modify these requirements based on the specific functionalities and characteristics of your app.