Friendsofthepeople / recall-server

A Node server for managing the verification of constituents, publishing of representative information, and signing to recall them.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recall Server

A Node server for managing the verification of constituents, publishing of representative information, and signing to recall them.

About Repo

  • 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.

Table of Contents

Stack

  • Typescript
  • Express JS
  • Docker
  • Docker Compose
  • PostgreSQL
  • JWT
  • Drizzle ORM
  • Jest
  • Eslint
  • Lerna, Nx and Yarn Workspaces

Join the Community

Getting Started with Development

Prerequisites

Setup

  1. Clone the repository
  • Using SSH
git clone git@github.com:Friendsofthepeople/recall-server.git
  • Using HTTPS
git clone https://github.com/Friendsofthepeople/recall-server.git
  1. Copy the .env.example file to .env and update the environment variables
cp .env.example .env
  1. Install the dependencies
yarn install
  1. Make the Development script executable
chmod +x dev-scripts.sh
  1. Run the development script to start up the docker containers
./dev-scripts.sh

Installing Node Modules

  • 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

Folder Structure

  • The project is a monorepo with the following structure:
.
├── packages
│   ├── common
│   ├── core
│   ├── data
│   ├── recall-api (Express Server)
│   ├── eslint-config
│   ├── jest-config

Running Tests

  • To run tests in a package, run the following command:
yarn test:watch <package-name>

Linting

  • To lint the code in a package, run the following command:
yarn lint <package-name>

Fixing Lint Issues

  • To fix lint issues in a package, run the following command:
yarn lint:fix <package-name>

Additional Libraries

Drizzle ORM

  • 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

License

  • This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Code of Conduct

  • Please read our Code of Conduct before contributing.
  • By participating in this project, you agree to abide by its terms.
  • We are committed to creating a welcoming and inclusive community.
  • We expect contributors to adhere to the Contributor Covenant code of conduct.

Development

About

A Node server for managing the verification of constituents, publishing of representative information, and signing to recall them.

License:MIT License


Languages

Language:TypeScript 90.2%Language:Dockerfile 5.3%Language:JavaScript 2.8%Language:Batchfile 1.1%Language:Shell 0.6%