A website like Patreon, built by two 11 graders with Flask and Svelte JS.
Currently supported OS are Mac OS, Ubuntu and Windows. You can probably run the project on other OS but you have to install the requirements by yourself. In the documentation there is an installation guide for Mac OS, Ubuntu and Windows.
You can install Python 3 for Windows from this link. At the time of developing the project, the latest Python version is 3.8.2. Keep in mind that if you are using Windows XP or earlier the latest version is Python 3.4.3.
Depending on your processor type (32-bit or 64-bit) you should install Windows x86 executable installer or Windows x86-64 executable installer.
Once the download is ready, open the executable file and you will see an installation wizard pop up. You can set your own installation path for Python 3 if you like, but default will do the work for you. In the bottom of the wizard there is are two checkboxes. Make sure "Add Python 3.x to PATH" is selected in order to make the installation process easier.
If you have installed Python 3 successfully, you should have PIP (Package Installer for Python) installed as well. Check out this article in order to install pipenv
. pipenv
is a virtual environment and the idea is that you don't have to install all Python dependencies for the project on your machine and with just 1 simple command you can have them all while you are running the project.
In order to install Node JS for Windows go to this link and select the Windows installer. Once it is installed you will have to go through the installation wizard. PATH will be set automatically and npm
will be installed automatically.
First, you need to have Python 3 on your machine. To install it:
Start by updating the packages list and installing the prerequisites:
$ sudo apt update
Add the deadsnakes PPA to your sources list:
$ sudo add-apt-repository ppa:deadsnakes/ppa
When prompted press Enter
to continue:
Press [ENTER] to continue or Ctrl-c to cancel adding it.
Once the repository is enabled, install Python 3.7 with:
$ sudo apt install python3.7
At this point, Python 3.7 is installed on your Ubuntu system and ready to be used. You can verify it by typing:
$ python3.7 --version
Then, you need pip
:
Use the following command to install pip for Python 3:
$ sudo apt install python3-pip
The command above will also install all the dependencies required for building Python modules.
Once the installation is complete, verify the installation by checking the pip version:
$ pip3 --version
Check out this article for detailed explanation on how to install pipenv
.
Finally, you need Node JS and npm
$ sudo apt install nodejs
$ nodejs -v
npm
as well:$ sudo apt install npm
npm
is installed successfully by typing:$ npm -v
To install Python 3 on Mac OS go to this link and choose version to download. You will have to go through a quick setup wizard but then you are good to go.
If you are using Mac OS High Sierra (version 10.13) or newer you can install Python 3 via Homebrew:
$ brew install python3
If you don't have Homebrew on your Mac, check out Homebrew's Installation Guide on how to install Homebrew.
By installing Python 3 you will also have pip
installed automatically.
Then you need to install pipenv
which can be installed by:
$ brew install pipenv
or
$ pip3 install pipenv
Finally, you will need to install Node JS and npm
. Go to this link and install Node JS for Mac OS. Once installed, open the package and follow the steps in the Node JS Installer. Once you are done, you should have both Node JS and npm
installed on your Mac.
To verify, you can open Terminal and type the following commands:
$ node -v
$ npm -v
Go to Terminal (Mac OS or Ubuntu) or Command Prompt (Windows) and type the following command:
$ cd Odyssey/odyssey
This will redirect you to the directory of the project. Then start the server by typing:
$ make
The Makefile runs the following script:
all:
make flask & make svelte
flask:
pipenv install && pipenv run flask run
svelte:
cd client/ && npm install && npm run autobuild
Go to your browser and open localhost:5000
Go to Terminal (Mac OS and Ubuntu) or Command Prompt (Windows) and type the following commands:
$ cd Odyssey/odyssey
$ pipenv install
$ pipenv shell
$ cd client/
$ npm install
pipenv
will install any libraries used in Flask, whereas npm
will install any libraries used in Svelte JS.
When you have finished developing, you can exit the virtual environment by typing:
$ exit
in /odyssey
directory.
We have used Sublime Text 3 for developing the project. You can also install Svelte
from Package Control for Svelte syntax highlighting
Flask for backend
Svelte JS for frontend and REST API
Page JS for routing web page
PyMongo as database
Python Dotenv for app configurations
If you want to become a contributor, check out CONTRIBUTING.md
Gabriela Yoncheva
Ognian Baruh