This project is all about making arcades easier to run! It’s a system where managers can set up games and their prices, attendants can handle payments and add tickets to cards, and prize counters can help people trade tickets for prizes. It’s built using Python and called Flask, and everything is stored in a database. The design is simple and modern. Check it out!
Follow these steps to get the Arcade Management System running locally and deploy it.
Before you begin, make sure you have the following tools installed on your machine:
First, click the download button above and unzip the below file.
arcade-project.zip
It’s a good idea to use a virtual environment to manage the dependencies for this project. In your terminal, navigate to the project folder and run the following commands:
cd arcade-management-system
python3 -m venv venv
This will create a virtual environment named venv
.
Activate the virtual environment:
source venv/bin/activate
venv\Scripts\activate
You should now see (venv)
in your terminal, indicating that the virtual environment is active.
With the virtual environment active, install the project’s dependencies by running:
pip install -r requirements.txt
This will install Flask, SQLite, and any other necessary libraries listed in the requirements.txt
file.
Next, initialize the SQLite database by running the initialize_db.py
script. This will set up the necessary tables in the database:
python initialize_db.py
Now that everything is set up, you can run the project locally. In your terminal, make sure you’re in the project directory and then run:
python app.py
This will start a local development server. By default, the website will be accessible at http://127.0.0.1:80/
in your browser. You can also just go to http://localhost
To deploy the project online, you can use platforms like Heroku, DigitalOcean, or AWS. Below are instructions for deploying to Heroku.
If you don’t have the Heroku CLI installed, download and install it from the official Heroku website.
After installing the Heroku CLI, log in to your Heroku account by running the following command in your terminal:
heroku login
This will open a new browser window to authenticate your account.
Navigate to your project directory in the terminal, then create a new Heroku app by running:
heroku create
This will automatically generate a unique name for your app and set up a remote repository for Heroku deployment.
You’ll need to use a cloud-based database for Heroku, such as Heroku Postgres or SQLite (for simplicity, SQLite can be used for small apps).
To add a Heroku Postgres database, run:
heroku addons:create heroku-postgresql:hobby-dev
This will provision a PostgreSQL database for your app on Heroku.
Once your app is set up, deploy your project to Heroku by pushing the code to Heroku’s remote repository:
git push heroku master
Heroku will automatically detect the Python application and install the necessary dependencies from requirements.txt
.
Once the deployment is finished, open your app in the browser by running:
heroku open
Your app will now be live!
If you want to customize the project or deployment settings, here are some things you can do:
initialize_db.py
script to work with other databases like PostgreSQL instead of SQLite.app.py
file to support environment variables (e.g., for API keys or production settings).