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:
- Add Constituents: Easily add new constituents with relevant details.
- View Constituents: Browse and search through the list of constituents.
- Update Modify existing constituents.
Make sure you have the following installed on your machine:
- Clone the repository:
git clone https://github.com/graphcs/ConstituentManager
- Navigate to the project directory:
cd ConstituentManager- Install server dependencies:
npm install- Move to the client directory and install client dependencies:
cd client
npm install- Return to the project root:
cd ..-
Install Docker: https://docs.docker.com/get-docker/
-
Set up docker volume for mongodb:
docker volume create mongodbdata- 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
- 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 - Create a .env file in the server:
touch .env- Add the following configurations to the
/server/.envfile:
PORT=9090
MONGO_URI=mongodb://0.0.0.0:27017/constituentmanager- Create a .env file in the client:
touch .env- Add the following configurations to the
/client/.envfile:
REACT_APP_API_URL=http://45.55.42.44:9090
PORT=80- Start the server by running below command in server folder:
npm start- In a separate terminal, start the client by running below command in client folder:
npm start-
Open your browser and go to http://localhost:80 to access
-
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- To rebuild the client:
mern-app# cd client
mern-app# npm run build- To run server tests:
cd server
npm test```