Installation Guide for Local Development

This guide will help you set up your development environment to work on the project. Please follow the steps below to ensure a smooth setup process.

Prerequisites

Before you begin, make sure you have the following installed on your system:

  • Git
  • Node.js and yarn

Step 1: Clone the Repository

Start by cloning the project repository and navigating to the root folder of the project:

git clone https://github.com/Manifest-Git/wgs-mono.git
cd wgs-mono

Step 2: Install Dependencies

Install all necessary dependencies for the project by running the following command:

yarn run install:all

This command installs dependencies for both the server and the client components of the project.

Step 3: Set Up Environment Variables

You will need to create .env files for both the server and the client. These files will store sensitive information and configurations.

Server Environment Variables

Create a .env file inside the server folder and populate it with the following keys. Replace the placeholder comments with your actual values:

apiPublicKey=YOUR_API_PUBLIC_KEY
apiPrivateKey=YOUR_API_PRIVATE_KEY
organizationId=YOUR_ORGANIZATION_ID
moesifId=YOUR_MOESIF_ID
SYNDICATE_API_KEY=YOUR_SYNDICATE_API_KEY
X_API_KEY=YOUR_CLIENT_HEADER_KEY
POSTGRES_HOST=YOUR_POSTGRES_HOST
POSTGRES_PORT=5432
POSTGRES_USER=YOUR_POSTGRES_USER
POSTGRES_DATABASE=YOUR_POSTGRES_DATABASE
POSTGRES_PASSWORD=YOUR_POSTGRES_PASSWORD

Client Environment Variables

Create a .env file inside the client folder with the following keys:

NEXT_PUBLIC_API_BASE_URL=/api
NEXT_PUBLIC_X_API_KEY=YOUR_MATCHING_SERVER_X_API_KEY
NEXT_PUBLIC_BASE_URL=YOUR_COMPOSER_BACKEND_BASE_URL

Ensure the NEXT_PUBLIC_X_API_KEY matches the X_API_KEY set in the server’s .env.

Step 4: Initialize Database Tables

Run the following command to create the required database tables:

yarn run init:tables

Step 5: Start the Development Server

Finally, to start the development server along with the client and documentation, run:

yarn run dev

Your setup is now complete! You can begin developing and testing your application locally.

Accessing the Dashboard

Once the development server is up and running, you can access the dashboard by navigating to:

http://localhost:3000

Here, you can sign up or log in to start exploring and using the WGS.