BKSalman / musawarah

مُصَوّرَة منصة لمؤلفي القصص المصورة

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

مُصَوّرَة

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

Built with

This platform is developed using the following tools and technologies:

Backend:

  • Axum Web framework
  • Garde Validation crate
  • Diesel Database ORM
  • TS-rs Generate TS bindings from the backend models

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

# 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

About

مُصَوّرَة منصة لمؤلفي القصص المصورة

License:GNU General Public License v3.0


Languages

Language:Rust 71.1%Language:Svelte 21.3%Language:TypeScript 4.8%Language:Nix 1.7%Language:PLpgSQL 0.5%Language:JavaScript 0.3%Language:HTML 0.2%Language:CSS 0.1%