This repository contains the "bullet-proof" 4,000+ lines of source code to the UI of a dice-rolling betting game application.
The code was built while following the 22-hour video course "Build a SaaS (web) Applications with Flask" (and Docker) (bsawf) marketed at buildasaasappwithflask.com by full-stack developer NickJanetakis.com (@nickjanetakis). BTW Nick also created and maintains a course on Docker and a podcast Running in Production. Udemy.com?
The latest version of the completed app is at
https://github.com/nickjj/build-a-saas-app-with-flask.git
Unique to this website is a bash shell script I've written that enables you to run it on your MacOS laptop with one command.
-
View my script at:
https://github.com/wilsonmar/build-a-saas-app-with-flask/blob/master/install-bsawf.sh
This script is explained in the section below.
-
Execute the script yourself by triple-clicking this command below:
bash -c "$(curl -fsSL https://raw.GitHubusercontent.com/wilsonmar/build-a-saas-app-with-flask/master/install-bsawf.sh)" -d -a -v
-
Open a Terminal on your mac, click on it, and keypress command+V to paste.
The script should install everything needed, then open the app in your default browser.
e_modules/sass-loader/dist/cjs.js!./app/app.scss 249 KiB {mini-css-extract-plugin} [built]
webpack_1 | + 12 hidden modules worker_1 | [2020-01-17 04:59:42,036: INFO/Beat] beat: Starting...
Press Ctrl+C if you want to stop it.
- Open another Terminal
In the script are comments of what responses looked like.
-
Open another Terminal to run tree to see all the folders and files to the finished app:
├── Dockerfile
├── LICENSE ├── README.md ├── SnakeEyes_CLI.egg-info │ ├── PKG-INFO │ ├── SOURCES.txt │ ├── dependency_links.txt │ ├── entry_points.txt │ ├── requires.txt │ └── top_level.txt ├── assets │ ├── app │ │ ├── app.js │ │ ├── app.scss │ │ ├── modules │ │ │ └── bootstrap.js │ │ └── scss │ │ ├── _forms.scss │ │ ├── _nav.scss │ │ ├── _sticky-footer.scss │ │ ├── _typography.scss │ │ ├── _variables-bootstrap.scss │ │ ├── _variables.scss │ │ └── all.scss │ ├── package.json │ ├── postcss.config.js │ ├── static │ │ ├── 502.html │ │ ├── images │ │ │ └── snake-eyes.jpg │ │ ├── maintenance.html │ │ └── robots.txt │ ├── webpack.config.js │ └── yarn.lock ├── cli │ ├── init.py │ ├── cli.py │ └── commands │ ├── init.py │ ├── cmd_cov.py │ ├── cmd_flake8.py │ └── cmd_test.py ├── config │ ├── init.py │ ├── gunicorn.py │ └── settings.py ├── docker-compose.override.example.yml ├── docker-compose.override.yml ├── docker-compose.yml ├── docker-entrypoint.sh ├── lib │ ├── init.py │ ├── flask_mailplus.py │ └── tests.py ├── requirements.txt ├── setup.py └── snakeeyes ├── init.py ├── app.py ├── blueprints │ ├── init.py │ ├── contact │ │ ├── init.py │ │ ├── forms.py │ │ ├── tasks.py │ │ ├── templates │ │ │ └── contact │ │ │ ├── index.html │ │ │ └── mail │ │ │ └── index.txt │ │ └── views.py │ └── page │ ├── init.py │ ├── templates │ │ └── page │ │ ├── home.html │ │ ├── privacy.html │ │ └── terms.html │ └── views.py ├── extensions.py ├── templates │ ├── layouts │ │ └── base.html │ └── macros │ ├── flash.html │ └── form.html └── tests ├── init.py ├── conftest.py ├── contact │ ├── init.py │ ├── test_tasks.py │ └── test_views.py └── page ├── init.py └── test_views.py 26 directories, 70 files
Different packages and libraries are mentioned in various files (assets folder), but they are listed below in alphabetical order:
- Ajax requests
- Babel
- Bash script*
- Bootstrap
- Celery
- CSRF Protection
- distutils.util (in config/settings.py)
- Docker Compose
- ES6 JS
- Flake8 to analyze Python code (in cli/commands/cmd_flake8.py)
- Flask
- Flask-Mail to send emails
- Fontawesome
- Gunicorn
- Jinga2
- JSON format files
- NodeJs
- PostgreSQL persistant store
- Pytest package
- Redis cache
- Scss
- SQLAlchemy
- Stripe microtransaction payments for subscriptions and coupon detection. It uses RESTFUL APIs.
- Yarn task runner
- Webpack (assets/webpack.config.js)
VIDEO playlist: What Does This Course Cover?
- Coupon code
- Subscriptions
- Billing history
- Contact form
- Admin dashboard
- Search through a list of users
- [3:55] Edit details about each user
- Internationalization (i18n)
-
multi-tenancy
-
RESTful APIs. However, Nick created a separate Mar 28, 2018 VIDEO about building RESTful APIs.
-
GraphQL
-
Swagger/OpenAPI
The course's materials promises to show "the real (battle-hardened production) way (to create the Snakeeyes app), without tedious research".
-
Once you have paid, visit Downloading the course materials
-
Unzip
-
In Finder view the folders unzipped:
06-creating-a-base-flask-app
07-blueprints-and-jinja-2-templates 08-testing-and-code-quality 09-creating-a-cli-script 10-using-our-first-flask-extension 11-creating-a-contact-form 12-creating-a-complete-user-system 13-creating-a-custom-admin-dashboard 14-logging-middleware-and-error-handling 15-quality-of-life-cli-improvements 16-accepting-recurring-payments 17-building-the-snake-eyes-game 18-processing-microtransactions 19-database-migrations 20-internationalization-i18n
-
View the updates video: 3 Upgrading a Dockerized Flask App from Python 2.7 to Python 3.7.4 August 2019. 30:06
originally python:2.7-slim from DockerHub
-
Testing (using Pytest)
-
CLI Script to "help manage your project" in cli/cli.py
-
Web Sockets*
If you want to create your own app based on these assets:
- Change Nick's email in https://github.com/nickjj/build-a-saas-app-with-flask/blob/master/assets/static/502.html
TODO:
https://www.youtube.com/watch?v=agXtLglF5Lw&list=PL-v3vdeWVEsUDDWYgZ8ImfSORIHyrsBJy&index=10
https://s3.amazonaws.com/thinkific-import-development/49114/bsawfcoursematerial-191204-142013.zip exposed in https://github.com/JohnBobo/bsawf and https://github.com/jademount/bsawf and https://github.com/OprekAbleCom/bsawf-course-material
-
https://github.com/26huitailang/bsawf by Peter Chen
-
https://github.com/acuencadev/SnakeEyes (archived)
https://www.youtube.com/watch?v=5b8OiqQ6NuY
https://www.youtube.com/watch?v=5gu8wWX3Ob4 A Productive Linux Development Environment (WSL) on Windows with WSL, Docker, tmux, VSCode and More Dec 21, 2018 [19:32] https://www.youtube.com/watch?v=A0eqZujVfYU Developing on Windows with WSL2 (Subsystem for Linux), VS Code, Docker, and the Terminal by Scott Hanselman
Live Demo: How to Begin Writing Tests in an Untested Code Base