This is a demonstration of a Lite Asset Management API the Lite Asset Management UI With it's respective respotistory here
A (hopefully) live version of the API docs can be found here
Additionally a (should be) live version of the UI can be found here
Ensure docker is installed w/ sudoless mode and the docker compose plugin for the below quick start, start manually via container/psql/docker-compose.yml
-- Though you will still need the docker compose plugin
- Run
cp env.example .env
-- And then edit .env to fill in missing fields - Open two terminals
- In Terminal_1 - Run
pnpm i
- In Terminal_1 - Run
pnpm db:start
* - In Terminal_2 - After docker starts run
pnpm migrate
orpnpm migrate:clean
if you need to reset DB state to a fresh slate - In Terminal_2 - After migration completes run
pnpm start
orpnpm start:dev
if developing locally and wishing to see changes
You should have two terminals running:
Terminal_1: Running a Postgresql Docker container that has the migrations ran to and is ready to use Terminal_2: Running the NestJS application in normal or development mode.
*If pnpm refuses to start docker:
If on linux ensure you have sudoless setup
Alternatively cd into the containers/psql
directory to run the container manually
API Docs are available as a swagger doc at /api-docs
when the API is running.
This project is built using NestJS w/ TypeScript.
It uses PostgreSQL for the DB and includes a Docker setup for local development.
A Lite UI using react can be found here to interact with this API
- Node.js
- pnpm
- Docker ( For running local containers )
- PostgreSQL ( See notes below )
A quick to start container is included for local development inside containers/psql/migrations
See the readme inside containers
for instructions on running & migration
Create an .env
file in the root of the project and add the following variables:
JWT_SECRET
: Secret key for backend JWT signingPRIVY_APP_ID
: Privy application IDPRIVY_APP_SECRET
: Privy application secretDB_HOST
: Database HostDB_NAME
: Database NameDB_USER
: Database UserDB_PASSWORD
: Database User's PasswordDB_PORT
: Database Port
See .env.example for an example entry with non-private fields already filled
- Application can be started with
pnpm start:dev
- Unit tests can be ran with:
pnpm run test
Linting checked via workflow action but can also be ran manually via:
pnpm run lint
, with :fix
- To attempt fixes and save prettify changes
TODO: Add husky precommit, commit linting & es-linting
An interactive drawing of the authentication flow can be found here
Or viewed below at a static image: