Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gmickel committed Jul 19, 2024
0 parents commit b7ebdca
Show file tree
Hide file tree
Showing 46 changed files with 2,253 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: pages
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist folder
path: ./dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

todos.md
49 changes: 49 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "format/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],

// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml",
"xml",
"gql",
"graphql",
"astro",
"css",
"less",
"scss",
"pcss",
"postcss"
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Gordon Mickel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
100 changes: 100 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# 🚀 CodeQuest: Your Ultimate Quiz Adventure Builder! 🧠

Welcome to CodeQuest, the quiz game that's more addictive than trying to fix a bug at 3 AM! Born from the cosmic depths of [OpenEHR Quest](https://github.com/gmickel/openehr-quest) which in turn was originally created as part of an internal company presentation at [Cistec](https://github.com/cistec-com)., CodeQuest is here to turn your boring old quiz into a thrilling adventure through the realms of knowledge!

![CodeQuest Screenshot](/images/screenshot.png)

## 🌟 Features That'll Make Your Brain Do a Happy Dance

- 🧠 **Dynamic Question Loading**: Questions appear like magic, no rabbit (or developer) required!
- ⏱️ **Time-based Challenges**: Race against the clock! (It's totally cool to pretend you're defusing a bomb)
- 🏋️ **Difficulty Levels**: From "I just learned to code" to "I dream in binary"
- 🎨 **Snazzy Code Highlighting**: Making your code snippets look prettier than a sunset
- 🔊 **Sound Effects**: Auditory dopamine hits for your correct answers!
- 🎖️ **Badges**: Award badges for completing levels and mastering the game
- 🎊 **Confetti**: Celebrate your achievements with a rainbow of confetti!
- 🏆 **Score Sharing**: Brag about your big brain energy on social media
- 📱 **Responsive Design**: Looks great on everything from your smartwatch to your smart fridge

## 🎭 Question Features (The Real Stars of the Show)

- 📝 **Markdown Support**: Write questions and answers in Markdown for easy formatting
- 🔥 **Code Snippets**: Include code snippets to test your knowledge
- 🖼️ **Images**: Include images to spice up your questions
- 🧩 **Multiple Choice**: Create questions with multiple answer options
-**Time Limits**: Set time limits for each question to keep players on their toes
- 🔢 **Difficulty Levels**: Assign difficulty levels to questions
- 💡 **Hints**: Provide hints for when players get stuck
- 📚 **Explanations**: Give detailed explanations for answers to enhance learning

Check out `example-question.md` for a comprehensive example of all these features in action!

## 🚀 Quick Start Guide (No Rocket Science Degree Required)

1. Clone this repo:
```
git clone https://github.com/gmickel/codequest.git
```

2. Navigate into your new quest headquarters:
```
cd codequest
```

3. Install the magical dependencies:
```
bun install
```
(No bun? No problem! `npm install` works too, but it's less fun to say)

4. Embark on your development journey:
```
bun run dev
```

5. Open `http://localhost:5173` and watch your quiz come to life!

## 🛠️ Customization (aka. Make It Yours)

1. Head to `src/config.ts` and change the title, description, and other details. It's like redecorating, but for your quiz!

2. Add your own questions in `src/questions/`. Each `.md` file is a new adventure waiting to happen!

3. Want to change the looks? Dive into `src/components/Quiz/styles.css` and make it prettier than a double rainbow!

## 🌐 Deploying Your Quest to the World (aka. GitHub Pages)

1. Push your changes to GitHub. (Don't forget to `git add .` and `git commit -m "Made my quiz awesome"`)

2. Go to your repository settings, find the "Pages" section, and set the source to the `gh-pages` branch.

3. Run the deployment spell:
```
bun run deploy
```

4. Watch in awe as your quiz magically appears at `https://yourusername.github.io/codequest`!

## 🤝 Contributing (Because Teamwork Makes the Dream Work)

Got an idea that's so good it keeps you up at night? Here's how to make it a reality:

1. Fork this repo (it's like adopting, but for code)
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request and wait for the internet high-fives!

Check out the [contribution guide](CONTRIBUTING.md) for more details on adding questions and features!

## 📜 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. It's basically the "do whatever you want, just don't blame me" license.

## 🙏 Acknowledgments

- A big, cosmic thank you to [OpenEHR Quest](https://github.com/gmickel/openehr-quest) for being the primordial soup from which CodeQuest evolved!
- Shoutout to caffeine, the true MVP of this project
- And finally, thanks to you, for reading this far. You're the real hero! 🦸‍♂️

Now go forth and create quizzes that'll make people forget about doomscrolling! 🚀🧠🎉
Binary file added bun.lockb
Binary file not shown.
17 changes: 17 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/index.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
10 changes: 10 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import antfu from '@antfu/eslint-config';

export default antfu({
markdown: true,
stylistic: {
indent: 2,
quotes: 'single',
semi: true,
},
});
Loading

0 comments on commit b7ebdca

Please sign in to comment.