- Description
- Features
- Challenges along the Way
- Future Features
- Tech Stack
- How to Install and Run the application
- How to Use
- Credits
When you want to play the board game Cashflow - How to get out of the rat race by the author Robert Kyosaki, you will encounter the problem of annoying calculations. Because the game is about income and expenses, assets and liabilities, and the interaction of these, it forces you to do calculations all the time.
You could do them all by hand, but that will
- increase the time spent playing this game and
- decrease the game fun.
Because the already existing companion mobile app for this board game is
- old
- not responsive
- not well designed
- and only for iOS devices
I wanted to develop a beautiful, responsive and intuitie web app which runs on every browser and operating system.
It should calculate important measures of game progress (like assets, liabilities, income from salary and cash flow from assets, expenses from taxes, liabilities and other) so that the user can focus on the game and not the calculations.
The app should do that while also being very intuitively designed so that every user knows exactly what to do.
As a user, I want to see my (fictional) balance and be able to change it by getting income from payday and paying expenses.
As a user, I want to see my collection of liabilities like mortgages and loans and be able to pay them off
As a user, I want to see my collection of assets like real estate, stocks, businesses and gold an be able to buy and sell these assets
- having a starting point where one could choose different professions and so also different income starting levels
- switching from the inner ring of the board to the “fast track” (later in the game)
- being able to use only one device for the whole game, so that only one user operates the app (game master function)
- being able to connect different devices, so that everyone can see other players in his interface (multiplayer function)
The website has many working routes, is responsive for almost every screen size on almost every page and is connected to a database.
Users are able to create an account, log in and change their data.
They can also setup a game with a specific profession that takes data from and API and a database.
Reviewing my MVP expectaions at the end of the project phase, I clearly underestimated the time it takes to write good JavaScript code. I did not think that the backend and deployment would take so much work, nor have I thought about the time required to design good-looking layouts. My final project does not match my MVP.
I recognized that a setup should be included in the MVP so I started working on that function first, completely forgetting about the main function of the app: doing the actual calulations.
I ended up with a good looking and clean coded application which does not serves any purpose at the end.
As you can read in failures, the primary feature of the application does not work. This would be my starting point for future development.
Using another module at my university to recode the whole project in another language like Node or Express could be another idea for the future too because I would really love to get deeper into the frontend an JavaScript topics.
- Application Code: Flask
- Model: SQLAlchemy & Migrate
- View: Jinja2
- Language Interpreter / Engine: Python3
- Database: SQLite3
- Web Server: Flask
You should install a version of python3. On Mac, it should cone pre-installed but you should consider updating if you do not have a version of python3 but python2 (check your version by running python3 --version
in the command line).
Because the project will have some required packages like flask and we do not want to interfere with all the packages on your computer, you have to create a virtual environment. Enter python3 -m venv venv
into the command line.
Note: It is crucial that you do this step while being in the right directory. This should be a copy of this GitHub repository on your computer.
If you want to run your local flask server, you will need to do that with the virtual environment activated.
To activate your virtual environment, type source venv/bin/activate
on Mac & Linux.
(Be sure deactivate the virtual environment when you want to use the command line like normal again. Run deactivate
for that. If the comamnd line doesn't show "(venv)" it means, the environment isn't active.)
First, create a .env file inside of the directory. In here you have to set some basic variables for your virtual environment to work properly.
Paste these in the .env file and save:
FLASK_ENV=development
DATABASE_URL=sqlite:///database.db
FLASK_APP=run.py
SECRET_KEY=
Important: you need to set a secret key after the equal sign. You can fin random keys here.
Be sure that your virtual environment is activated!
Then run python -m pip install -r requirements.txt
This will install all packages that are used in this project automatically. No need to install extra packages.
You will need to run four commands in your terminal to set up the database and fill it with some initial data for the game:
Be sure that your virtual environment is activated and you did step 4!
flask db init
flask db migrate -m 'first migration'
flask db upgrade
python -m app.scripts.seed
Now everything is ready to run:
- Run the server with
flask run
- Stop the server with the keyboard shortcut ctrl+c
It is pretty easy.
If you want to start a game, press start playing on the landing page or in the navigation bar.
Note: I did not achieve to program the main function of the app. You are only able to setup the game. More on that.
If you want to log in to save your games, click the account button at the top right.
If you want to go to the landing page, just click on the "Cashflow Companion" logo at the top left.
If you have other questions, go to /faq while the server runs.
Thanks a lot to CODE University & our lecturer Sam!