- Clone and download this repository. Create a new python virtual environment
in the top-level directory:
python -m venv .venv
. This makes development and managing dependencies MUCH easier; I always recommend working within virtual environments for Python development. To activate your environment, run the activation script:source .venv/bin/activate
. - Inside your environment, run
pip install -r requirements.txt
to install the python requirements. - Run
npm install
to install frontend requirements frompackage.json
. This will createpackage-lock.json
and thenode_modules
directory, which are both included in the.gitignore
. - That's it!
- To start the flask server, run
python server.py
. - To start the frontend development server, run
npm run dev
. - Navigate to
localhost:8000
in your browser. It should open automatically.
During development, I switch between platforms frequently (mainly Ubuntu and Windows). This allows me to make sure that everything is working as it should across different operating systems, so you can be reasonably optimistic that Planager will run on whatever you're running. VSCode helps immensely with this, as it automatically saves your workspace configuration and extensions. You are of course free to choose any development environment you wish.
Here is a quick overview of the main technologies used to build Planager:
- Backend:
- Planager - Python library for creating toolchains
- Flask for webapp
- Python-SocketIO for websocket server
- Frontend:
- Javascript
- socketio-client for websocket client
- Lit for creating web components
- npm for managing dependencies
- Local Development:
- VSCode
- webpack dev server
- Deployment:
- webpack for building and bundling
Heroku for hostingFiguring out an alternative because Heroku is dying.- Cloudflare for DNS management
I highly recommend creating a virtual environment if you haven't already! I like
to name mine .venv
, which is included in the .gitignore
because any
developer can recreate it on their machine. IDEs such as VScode can
automatically source the python interpreter from your virtual environment.
To record any additional Python libraries that you may have installed, run
pip freeze > requirements.txt
to update the requirements file. Ensure you are
working within your virtual environment, otherwise this command with include all
of the packages installed globally on your system!
Node modules are stored in the /node_modules
directory, which is created when
you run npm install
. To install a new node module, run
npm install modulename --save
. The --save
flag will save the module as a
production dependency, and --save-dev
will save it as a development
dependency.
Everyone has their preferences when it comes to IDEs and debuggers, but I find
VSCode to work well for me. I included a launch.json
configuration in .vscode/
.