A Node server for managing the verification of constituents, publishing of representative information, and signing to recall them.
- This repo hosts the open-source server powering Public Gavel.
- It exposes APIs to facilitate verification and registration of constituents in a credible and secure way.
- Typescript
- Express JS
- Docker
- Docker Compose
- PostgreSQL
- JWT
- Drizzle ORM
- Jest
- Eslint
- Lerna, Nx and Yarn Workspaces
- Clone the repository
- Using SSH
git clone [email protected]:Friendsofthepeople/recall-server.git
- Using HTTPS
git clone https://github.com/Friendsofthepeople/recall-server.git
- Copy the
.env.example
file to.env
and update the environment variables
cp .env.example .env
- Install the dependencies
yarn install
- Make the Development script executable
chmod +x dev-scripts.sh
- Run the development script to start up the docker containers
./dev-scripts.sh
- To install node modules in a package, run the following command:
yarn add -W <package-name>
- To update the node_modules inside docker, run the following command:
docker compose up --build
- The project is a monorepo with the following structure:
.
├── packages
│ ├── common
│ ├── core
│ ├── data
│ ├── recall-api (Express Server)
│ ├── eslint-config
│ ├── jest-config
- To run tests in a package, run the following command:
yarn test:watch <package-name>
- To lint the code in a package, run the following command:
yarn lint <package-name>
- To fix lint issues in a package, run the following command:
yarn lint:fix <package-name>
- Drizzle is a lightweight ORM for Node.js and TypeScript. It is designed to be simple and easy to use, while still providing the necessary features to work with databases.
- Drizzle ORM
- This project is licensed under the MIT License - see the LICENSE file for details.