Skip to content
This repository was archived by the owner on May 16, 2026. It is now read-only.

graphcs/ConstituentManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ConstituentManager

ConstituentManager is a web application built using the MERN stack (MongoDB, Express.js, React.js, Node.js) and styled with Tailwind CSS. It is designed to manage constituents effectively.

Live link: http://www.constituentmanager.com/

Video demo:

https://www.loom.com/share/2b45b9c053154a3e93785e024e4c02b1

Screenshot:

Screen Shot 2024-02-03 at 7 43 48 PM

Table of Contents

Features

  • Add Constituents: Easily add new constituents with relevant details.
  • View Constituents: Browse and search through the list of constituents.
  • Update Modify existing constituents.

Prerequisites

Make sure you have the following installed on your machine:

  • Node.js (v14 or later)
  • MongoDB (Make sure MongoDB server is running)

Installation

  1. Clone the repository:
git clone https://github.com/graphcs/ConstituentManager
  1. Navigate to the project directory:
cd ConstituentManager
  1. Install server dependencies:
npm install
  1. Move to the client directory and install client dependencies:
cd client
npm install
  1. Return to the project root:
cd ..

Database setup

  1. Install Docker: https://docs.docker.com/get-docker/

  2. Set up docker volume for mongodb:

docker volume create mongodbdata
  1. Start MongoDB in docker with volume for data persistence:
docker run -d --name mongodb -v mongodbdata:/data/db -p 127.0.0.1:27017:27017 mongo
  1. Seed the database:
mern-app# cd server 
mern-app# node seed.js 
mongodb://0.0.0.0:27017/constituentmanager
connected
Database seeded successfully.
mern-app 

Configuration

  1. Create a .env file in the server:
touch .env
  1. Add the following configurations to the /server/.env file:
PORT=9090
MONGO_URI=mongodb://0.0.0.0:27017/constituentmanager
  1. Create a .env file in the client:
touch .env
  1. Add the following configurations to the /client/.env file:
REACT_APP_API_URL=http://45.55.42.44:9090
PORT=80

Usage

  1. Start the server by running below command in server folder:
npm start
  1. In a separate terminal, start the client by running below command in client folder:
npm start
  1. Open your browser and go to http://localhost:80 to access

  2. You can also start and restart server using pm2 (from server folder):

npm install pm2 -g        
pm2 start npm --name "mern-app-server" -- start
pm2 restart mern-app      

for client:

pm2 start npm --name "mern-app-client" -- start
  1. To rebuild the client:
mern-app# cd client 
mern-app# npm run build
  1. To run server tests:
cd server
npm test```

About

Constituent management system web app built on the MERN stack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors