A basic trivia application built with Next.js, Tailwind CSS, and TypeScript. This app fetches trivia questions from a local db.json
file using the json-server
npm library. It is intended for learning development purposes, providing an engaging way to test your knowledge across various topics.
This Trivia app provides multiple-choice questions on topics such as geography, literature, history, science, sports, etc. It features randomized answer options for each question and immediate feedback on the correctness of answers.
- Multiple categories.
- Randomized answer options for each question.
- Immediate feedback on the correctness of answers.
- Simple and responsive user interface using Tailwind CSS.
- State management with React hooks.
- Node
- npm
- json-server
-
Clone the repository:
git clone git@github.com:paulocsb/trivia-nextjs.git
-
Navigate to the project directory:
cd trivia-nextjs
-
Install the dependencies:
npm install
-
Install
json-server
globally:npm install -g json-server
-
Start the
json-server
:json-server --watch db/db.json --port 3004
To start the development server, run:
npm run dev
Open http://localhost:3000 with your browser to see the result.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.