This is template repository for backend. Clone it/fork it and replace every instance of <company> with your company.
You can do it this way:
export OLD="company"
export NEW="my-awesome-app"
grep -rl --exclude-dir={.venv,.git} "$OLD" . | xargs sed -i "s/$OLD/$NEW/g"Don't forget to rename the folder as well.
Setup:
- uv version
0.9.*-curl -LsSf https://astral.sh/uv/install.sh | sh - docker version
28.5.* - Python 3.13 - installed via uv
uv python install 3.13
Creating .venv and installing dependencies:
$ uv venv .venv
$ uv sync --no-dev --frozenIf you want with development dependencies for development purposes:
$ uv sync --dev --frozenEnsure you have correct .env file and their values:
$ cp .env.example .envEnsure your scripts are exectuble:
$ chmod +x ./scripts/*If you wanna run backend code, you need to start docker and run entrypoint.sh. For convinience, all you need to do is do:
$ makeIn order to have fully functional datadabase, remember to plug in correct envs. -
POSTGRES__DB=companydb
POSTGRES__DB_USER=postgres
POSTGRES__DB_PASSWORD=postgres
POSTGRES__DSN=company-db
POSTGRES__PORT=5432Then upgrade the db to the most recent migration file.
# e.g. TARGET=heads && ALEMBIC_CONFIG="alembic/alembic.ini"
$ make db-upgrade TARGET=$(TARGET)
$ alembic -c $(ALEMBIC_CONFIG) upgrade $(TARGET)If you are having permission difficulties when creating migrations, run:
$ chmod 777 alembic/versions/