Vinting is a REST api school project that uses a relational database and has a responsive frontend.
Features:
- Relational database
- Rest api
- Responsive frontend
- Node.js and npm (or npm compatible node package managers like pnpm or bun)
- Rust toolchain
Warning
This project utilizes git submodules, if you don't clone the submodules you won't be able to compile the app
git clone https://github.com/SpawnCycle/vinting-server.git --recursivecargo buildOr if you want to build it in release mode
cargo build --releaseOr if you want to build with a different npm compatible package manager (eg. bun)
NPM=bun cargo buildOr if you want to rebuild the client webapp
REBUILD=1 cargo buildOr if you don't want to build the client at all
NO_WEB=1 cargo buildcargo runOr if you want to run it in release mode
cargo run --releaseOr if you want to run with a different npm compatible package manager (eg. bun)
NPM=bun cargo runRun the backend and then start the vite development server in the vinting-web directory with npm run dev
The server is runnable in debug mode without any extra data outside of the repo.
When running in release mode there should be a .env or a .env.production file with a few environment variables
Available environment variables:
- JWT_SECRET: MANDATORY FOR PRODUCTION, gets set to
secretin debug mode - ADMIN_EMAIL: sets the email for which an admin role will be registered
- INMEMORY: DEBUG EXCLISIVE, isn't read through the .env file, runs the database in the memory instead of a file
Build environment variables:
- NPM: sets the executable with which to execute the npm commands
- REBUILD: force rebuild the client
- NO_WEB: build the server without building the client
Note
See the endpoints documentation for details on endpoints
- src: Source files for the server
- dtos: This houses the dtos and the helper types used in the dtos (e.g. EmailString)
- entity: This has the sea-orm models and helper functions applied to sea-orm generated types (currently only has ActiveAction)
- services: Definitions for services and the service trait
- migrations: Migrations for the db, currently only has seed data