|
| 1 | +<h1 align="center">Quizzler - Quiz app</h1> |
| 2 | + |
| 3 | +<p align="center"> |
| 4 | + <img src="screenshots/banner.png"/> |
| 5 | +</p> |
| 6 | + |
| 7 | +<p align="center"> |
| 8 | + Quizzler is a simple and fun quiz game that challenges you with different categories and lets you compete for the leaderboard for all the correct answers! Built with Nuxt 3 and its ecosystem. |
| 9 | +</p> |
| 10 | + |
| 11 | +## App & Preview |
| 12 | + |
| 13 | +Play : [Quizzler](https://quizzler.jooo.my.id/) |
| 14 | + |
| 15 | +<p align="center"> |
| 16 | + <img src="screenshots/main.png"/> |
| 17 | +</p> |
| 18 | + |
| 19 | +## Library, Frameworks & Tools Used |
| 20 | + |
| 21 | +- [Nuxt 3](https://nuxt.com/) |
| 22 | + - [Nuxt UI](https://ui.nuxt.com/) |
| 23 | + - [Nuxt Google Fonts](https://google-fonts.nuxtjs.org/) |
| 24 | + - [Nuxt SEO](https://nuxtseo.com/) |
| 25 | +- [Supabase](https://supabase.com/) |
| 26 | + - [Nuxt Supabase](https://supabase.nuxtjs.org/) |
| 27 | +- [Pinia](https://pinia.vuejs.org/) |
| 28 | +- [TailwindCSS](https://tailwindcss.com/) |
| 29 | +- [Open Trivia Database](https://opentdb.com/) (The quiz API) |
| 30 | +- [Bun](https://bun.sh/) |
| 31 | + |
| 32 | +## Setup & Build |
| 33 | + |
| 34 | +if you want to continue or modify this project, you can follow these steps: |
| 35 | + |
| 36 | +- Clone this project |
| 37 | + |
| 38 | +```bash |
| 39 | +git clone https://github.com/jo0707/quizzler |
| 40 | +``` |
| 41 | + |
| 42 | +- Install dependencies (bun) |
| 43 | + |
| 44 | +```bash |
| 45 | +bun install |
| 46 | +``` |
| 47 | + |
| 48 | +This project uses Supabase as its leaderboard database: |
| 49 | + |
| 50 | +- Create a Supabase account |
| 51 | +- Create a new project |
| 52 | +- Create a leaderboard table, you can use this SQL query: |
| 53 | + |
| 54 | +```sql |
| 55 | +create table |
| 56 | + public.leaderboard ( |
| 57 | + id bigint generated by default as identity, |
| 58 | + created_at timestamp with time zone not null default now(), |
| 59 | + name character varying null, |
| 60 | + score integer not null default 0, |
| 61 | + time integer not null default 0, |
| 62 | + mode character varying not null default ''::character varying, |
| 63 | + constraint leaderboard_pkey primary key (id) |
| 64 | + ) tablespace pg_default; |
| 65 | +``` |
| 66 | + |
| 67 | +- Go to the leaderboard table, You can either disable the RLS, or create a new RLS that allows public to do INSERT and SELECT query. |
| 68 | + |
| 69 | +- Copy your project URL and public key from the project settings tab |
| 70 | + |
| 71 | +- Create new .env file and fill it with your Supabase credentials |
| 72 | + |
| 73 | +```env |
| 74 | +SUPABASE_URL=https://yourproject.supabase.co" |
| 75 | +SUPABASE_KEY="your.anon.token" |
| 76 | +``` |
| 77 | + |
| 78 | +- Run the project |
| 79 | + |
| 80 | +```bash |
| 81 | +bun dev |
| 82 | +``` |
| 83 | + |
| 84 | +- Build the project |
| 85 | + |
| 86 | +```bash |
| 87 | +bun run build |
| 88 | +#or |
| 89 | +bun run generate # static hosting |
| 90 | +``` |
| 91 | + |
| 92 | +## Contributing |
| 93 | + |
| 94 | +Made by [jo0707](https://github.com/jo0707) |
| 95 | + |
| 96 | +Feel free to contribute to this repository! |
0 commit comments