IntersectMBO / drep-campaign-platform

Other
2 stars 1 forks source link

πŸš€ Voltaire DRep Campaign Platform πŸš€

Description

The DRep Campaign platform was funded by Intersect MBO and originally developed by the Lido Nation team. The platform is a web3/web2 system that allows DReps to create a profile to facilitate their campaigns, communicate with prospective and current delegators, and showcase their onchain and off chain activities.

Table of content:

Introduction

This document serves as a comprehensive guide for setting up the full stack of our application, which includes the backend, frontend, and database components.

Prerequisites

Tech stack:

Server: Node, Nest.js

Database: PostgreSQL

Frontend: Next.js

Container: Docker

API Backend

The api backend is powered by nest.js, A progressive Node.js framework for building efficient, reliable and scalable server-side applications.

Database

For data persistence, we utilize PostgreSQL, known for its robustness, scalability, and reliability. This choice ensures that our application's data layer is secure, efficient, and capable of handling growth.

Frontend

The frontend is developed with Next.js, a React framework that allows for server-side rendering and static site generation. This choice enables us to create fast, SEO-friendly web pages that integrate seamlessly with our Strapi backend.

The instructions that follow will guide you through setting up each component of our application stack, ensuring a cohesive development and deployment process.

Getting started

Before you begin setting up the application, you'll need to clone the repository from GitHub to get a local copy of the code. Follow these steps to clone the repository and start setting up the application components:

  1. Clone the Repository:

    • Open a terminal on your computer.
    • Navigate to the directory where you want to store the project.
    • Run the following command to clone the repository:
      git clone https://github.com/IntersectMBO/drep-campaign-platform.git
  2. Navigate to the Project Directory:

    • After cloning, change into the project's root directory:
      cd drep-campaign-platform

      This directory contains all the files you need to set up the application, including the Docker Compose files and the separate directories for the backend and frontend components.

By cloning the repository, you ensure that you have the latest version of the code and all the necessary files to get started with the application setup.

Running locally

The app, all of it's dependencies including dev server with hot module reloading all run in docker environments. The only dependency you need on your machine is the docker engine. ollow these steps:

Backend setup

  1. From the root, run make backend-install

Database configuration

  1. Nothing to do as both postgres instances, one for the app and one for dbsync is already configure in the docker-compose file.

Frontend setup

  1. From the root, run make frontend-install

Running the application

The Next.js server, nest.js backend, cardano node, and postgres databases are automatically started when you run make up. This shortcut runs docker-compose up -d. To view the Next.js server during development you can follow the logs from the frontend container or run make logs.

Accessing the application:**

Overview of services in docker compose: