Boring web framework to get stuff done. A framework on top of frameworks.
Includes some functionality for a basic public micro-blogging app.
Quick Setup (Recommended--or follow Manual Setup):
-
Download and unzip project from https://github.com/letam/web-framework-2025/archive/refs/heads/main.zip (or clone this repo)
-
Open terminal and change present directory to be the project directory
-
Run the setup script:
./admin/setup/setup-all.sh -
Install just (for project commands)
-
Show the available project commands:
just --list -
Start the development servers:
Option A: Using tmux session (Recommended)
just devThis creates 2 tmux windows:
- Window 1 "servers": Backend server (left) and Frontend server (right)
- Window 2 "cli": CLI at project root (left) and CLI in app directory (right)
Option B: Manual terminal setup
- In one terminal:
uv run python server/manage.py runserver_plus - In another terminal:
cd app ; bun dev
The web app during development is served via http://localhost:8000
(If you don't want to run the quick setup script)
- Install uv (for Python package/project management)
- Install Bun (for JavaScript package/project management)
- Install just (for project commands)
- Install tmux (for development session management):
- macOS:
brew install tmux - Ubuntu/Debian:
sudo apt-get install tmux
- macOS:
- Download and unzip project from https://github.com/letam/web-framework-2025/archive/refs/heads/main.zip (or clone this repo)
- Open terminal and change present directory to be the project directory
- Install Python dependencies:
uv sync - Apply database migrations:
just migrate - Start the backend server:
just runserver
- In another terminal, change into the frontend app directory:
cd app - Install npm packages:
bun i - Create the
.envfile:cp .env.development.local.sample .env - Start the frontend dev server:
bun dev
- If you're on macOS and you didn't follow the quick setup, then ensure that gsed is installed, which can be done via
brew install gsedoradmin/setup/setup-mac.sh. We usegsedin shell scripts to manage configuration-deployment of project. - Run
just --listat any time to see the available project commands.
-
Follow above steps to install Python and project dependencies for both backend and frontend servers
-
Build app for production
./admin/prod/build-prod.sh
Before using the Fly.io commands:
- Install just
- Install the Fly.io CLI and make sure
flyandflyctlare available in your shell - Authenticate with Fly.io:
fly auth login - On macOS, ensure
gsedis installed if you plan to use the SQLite launch flow
To see the available Fly.io recipes:
just --list
-
Launch a new Fly app with SQLite:
just fly-launch-app <app_name>just fly-launch-appis an alias forjust fly-launch-app-sqlite. -
Deploy updates to an existing SQLite app:
just fly-deploy-app-sqlite <app_name>
-
Launch a new Fly app with Postgres:
just fly-launch-app-postgres <app_name> -
Deploy updates to an existing Postgres app:
just fly-deploy-app-postgres <app_name> -
Launch the Postgres app and then clone database machines for HA:
just fly-launch-app-ha <app_name>
just fly-machine-clone <app_name>
just fly-machine-clone-ha <app_name>-db
just fly-delete-replicas <app_name>
just fly-destroy-app-all <app_name>
TODO