BKSalman / musawarah

مُصَوّرَة منصة لمؤلفي القصص المصورة
GNU General Public License v3.0
0 stars 0 forks source link

مُصَوّرَة

منصة للقصص المصورة المستقلة

Built with

This platform is developed using the following tools and technologies:

Backend:

Frontend:

Building/Running the project

if you are on Linux/MacOS/WSL you can use the flake.nix file that contains the full dev environment:

just install the nix package manager and run:

# in project root
nix develop

Backend

make sure you have Rust & diesel-cli & docker installed (already done if using nix)

Database

to setup a dev database run the following commands:

this will run a local docker postgresql database that you can develop on

(already done if using nix)

docker run --name musawarah-dev -p 5432:5432 -e POSTGRES_PASSWORD=musawarah-dev -d postgres

then create a .env file in the project root with the following line:

DATABASE_URL=postgres://postgres:musawarah-dev@localhost:5432

there are more environment variables needed, for those you can talk to Salman to give it to you :)

after you have all environment variables, you need to export them all in bash you do:

# in project root
source .env

# if it doesn't work use this
export $(cat .env)

this will use the migrations in the migrations folder to apply to the database


# first install diesel-cli with cargo (already installed if using nix)
cargo install diesel-cli

in project root

this will apply the migrations to the database

diesel-cli migration run


#### Run dev server
```bash
# in project root
cargo run

Run dev server with logging

# in project root
RUST_LOG=debug cargo run # unix-like shells only

Run tests & generate TS bindings/types

# in project root
cargo test

Frontend

frontend setup instructions

Backend Endpoints

All endpoints are documented with OpenAPI documentation standard, and can be viewed in Swagger by opening <baseurl>/swagger-ui/ while the server is running