secajs/README.md

45 lines
1.6 KiB
Markdown
Raw Normal View History

2025-02-21 16:56:58 +01:00
# laseca
2025-02-05 12:20:53 +01:00
2025-02-21 16:56:58 +01:00
laseca is a social bitcoin to cash exchange, implemented as a webapp.
2025-02-05 12:20:53 +01:00
2025-02-22 00:21:18 +01:00
## Upcoming stories
* [ ] Create offer
* [ ] Display existing offers
* [ ] Archive offer
2025-02-14 23:45:58 +01:00
## How to set up dev environment
2025-02-05 12:20:53 +01:00
2025-02-14 23:45:58 +01:00
* Pre-requisites
+ `docker` and `docker compose`
+ `node` and `npm`
2025-02-21 16:56:58 +01:00
* Installing
+ Run `npm install`
2025-02-21 16:58:00 +01:00
+ You can now start the app in a container by running `npm run start:container` (and shut it down with `npm run stop:container`).
2025-02-21 16:56:58 +01:00
* Running
2025-02-21 17:18:25 +01:00
+ Copy the `.env.dist` file into `.env` and set any values you like.
2025-02-21 16:56:58 +01:00
+ The app will run in a single container, with a Postgres database, a caddy webserver and the nodejs app.
+ Note that the container doesn't come with a volume for Postgres: default behaviour is to start from scratch every time you create the container, delete everything every time you delete the container.
+ The docker image launches the nodejs app with nodemon, so changes to the code will be available immediately.
2025-02-21 17:18:25 +01:00
+ The Postgres database is reachable from the host, so you can use your favourite SQL client to access it.
+ You can format with `npm run format` and lint with `npm run lint`.
2025-02-05 13:21:00 +01:00
2025-02-14 23:45:58 +01:00
## How to deploy
The app has never been deployed in production, so there's a lot of things to polish.
The (hypothetical) approach is to:
* Spin up a linux box.
* Install node, caddy and postgres.
* Configure them all nice and stuff so they work together and have a reasonable production set up.
* Set up the node app with systemd so it runs proper.
2025-02-21 17:18:25 +01:00
## Docs
You can find documentation under `docs/`.
2025-02-14 23:45:58 +01:00
## Other
2025-02-21 17:18:25 +01:00
* `other/branding` contains brand assets of laseca.
* `other/nostr-brand-assets` contains some nostr-related open source icons, logos, etc.