Janjs / KnowTheFlagGame

A web based game about knowing the name of the country of its flag. Frontend built with Vue JS and backend built with Python using Django as a rest framework.

Home Page:https://know-the-country-flag-game.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Know the country flag game!!

You think you know about geography? lets test it! this Vue JS app with a Django backend challenges you to say of with country is the flag that shows up, you got 5 tries, with 3 hints (The hints just tell you the solution).

Check the leaderboard to see who gets the highest score!!

demo

Includes

  • Django
  • Django REST framework
  • Django Whitenoise, CDN Ready
  • Vue CLI 3
  • Vue Router
  • Vuex
  • Gunicorn
  • Configuration for Heroku Deployment

Template Structure

Location Content
/backend Django Project & Backend Config
/backend/api Django App (/api)
/src Vue App .
/src/main.js JS Application Entry Point
/public/index.html Html Application Entry Point (/)
/public/static Static Assets
/dist/ Bundled Assets Output (generated at yarn build)

Prerequisites

Before getting started you should have the following installed and running:

Setup Template

$ git clone https://github.com/Janjs/KnowTheFlagGame
$ cd KnowTheFlagGame

Setup

$ yarn install
$ pipenv install --dev && pipenv shell
$ python manage.py migrate

Running Development Servers

$ python manage.py runserver

From another tab in the same directory:

$ yarn serve

The Vue application will be served from localhost:8080 and the Django API and static files will be served from localhost:8000.

The dual dev server setup allows you to take advantage of webpack's development server with hot module replacement. Proxy config in vue.config.js is used to route the requests back to django's API on port 8000.

If you would rather run a single dev server, you can run Django's development server only on :8000, but you have to build build the Vue app first and the page will not reload on changes.

$ yarn build
$ python manage.py runserver

About

A web based game about knowing the name of the country of its flag. Frontend built with Vue JS and backend built with Python using Django as a rest framework.

https://know-the-country-flag-game.herokuapp.com/

License:MIT License


Languages

Language:JavaScript 36.7%Language:Vue 35.4%Language:Python 26.0%Language:HTML 1.9%