Welcome to the ZNet Quiz PG repository! This is a quiz web application inspired by Zenpro from Zenius Education. It's built with modern technologies including Next.js, Xstate, Clerk, and Vercel Postgres. The app is designed to offer a seamless and interactive quiz experience, backed by robust state management and secure authentication.
- Framework: Next.js for a robust front-end experience.
- State Management: Xstate to handle complex state logic efficiently.
- Authentication: Integrated with Clerk for secure user authentication.
- Database: Utilizes Vercel Postgres for reliable data storage and management.
- Deployment: Hosted on Vercel for seamless deployment and scalability.
This app employs two testing strategies:
- Jest: For testing the machine logic and services.
- Playwright: For model-based testing to ensure the UI works as expected.
Follow these steps to set up the project locally:
-
Clone the Repository
git clone https://github.com/dafex301/znet-quiz-pg.git
-
Environment Setup
- Populate the
.env
file based on the.env.example
.
- Populate the
-
Install Dependencies
npm install
-
Start Development Server
npm run dev
- Create a test file in
/tests/jest/TEST_NAME.test.ts
. - Run tests using:
npm run test
- Create a test file in
tests/playwright/TEST_NAME.spec.ts
. - To run Playwright tests:
npx playwright test
- For UI-based testing:
npx playwright test --ui
Contributions, issues, and feature requests are welcome! Feel free to check issues page for open issues or to open a new issue.