https://github.com/okorienev/natodi-backend
Backend for natodi mobile app
https://github.com/okorienev/natodi-backend
backend-api fastapi postgresql
Last synced: about 2 months ago
JSON representation
Backend for natodi mobile app
- Host: GitHub
- URL: https://github.com/okorienev/natodi-backend
- Owner: okorienev
- License: mit
- Created: 2023-07-10T08:41:34.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-22T12:56:12.000Z (over 2 years ago)
- Last Synced: 2025-01-09T10:18:44.689Z (over 1 year ago)
- Topics: backend-api, fastapi, postgresql
- Language: Python
- Homepage: https://apps.apple.com/gb/app/natodi/id1636361997
- Size: 217 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Natodi mobile app back-end application
## System requirements
- linux-based OS (or Windows + WSL)
- [docker](https://docs.docker.com/engine/install/) + [docker-compose](https://docs.docker.com/compose/install/)
## How to run project for the first time:
### Install required system dependencies
```shell
sudo apt update
sudo apt install \
build-essential \
curl \
libbz2-dev \
libffi-dev \
liblzma-dev \
libncursesw5-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libxml2-dev \
libxmlsec1-dev \
llvm \
make \
tk-dev \
wget \
xz-utils \
zlib1g-dev
```
### Install pyenv [Pyenv](https://github.com/pyenv/pyenv#getting-pyenv)
```shell
curl https://pyenv.run | bash
```
Add these lines to your ~/.bashrc, reload your shell
```shell
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
```
Run `pyenv version`, it should be the same as in `.python-version` file in repository root
Run `pyenv install`
### Install poetry [Poetry](https://python-poetry.org/docs/#installation):
```shell
curl -sSL https://install.python-poetry.org | python3 -
```
Add this line to your ~/.bashrc, reload your shell
```shell
export PATH="$HOME/local/bin:$PATH"
```
Check that everything is ok with `poetry --version`
### Install lets [lets](https://lets-cli.org/docs/installation)
```shell
curl --proto '=https' --tlsv1.2 -sSf https://lets-cli.org/install.sh | sh -s -- -b ~/bin
```
Add this line to your ~/.bashrc, reload your shell
```shell
export PATH=$PATH:$HOME/bin
```
Check that everything is ok with `lets --version`
### Run:
```shell
lets run
```
## Commands (check `lets --help` for full list of commands)
- `lets run` to run project
- `lets migrate-generate -m ` to create new db migration
- `lets generate-token` to create a token for access you can also add `-k ` to provide non-default key for token encription, and `-e ` for specific token duration (7 days by default)
- `lets check-auth -t ` to check the token activity
- `lets lint` to run linter & formatter