A web application to create polls implemented using webpack module federation. This is a monorepo contains multiple micro frontends.
-
Installing packages
Install all the dependecies in each of the microfrontends. In folders
authentication
,poll
,profile
,utils
andshell
yarn install
-
Running
Same as above, in all the folders, run following command
yarn dev
When running this command in
shell
folder, it will automatically open up browser else visit here
To run backed
cd server
docker-compose -f docker-compose.dev.yml up
On first time run, the migration and seeding will not be running since no database is created. So run again the same command. Sometime sequelize won't create database, in that case, manually create a database with whatever name you given in
.env
file. Follow these:docker psThis will list all the containers, from these copy the id of postgres, then
docker exec -it <POSTGRES_CONTAINER_ID> shThis will connect to postgres container and open up
sh
.psql -U <USER>This will connect to psql CLI. Run the following to create database
CREATE DATABASE <DATABASE NAME>
These are the different frontends used:
This is the home page of the app. To see more details click here
Hosted URL - link
Poll app take care of the polling part, where there will be 2 types of user (host/joinee). To see more details click here
Hosted URL - link
Profile is where user can create/edit polls and questions. To see more detail click here
Hosted URL - link
This will serve some of the common things to the other microfrontends. To see more details click here
Hosted URL - link
Shell will hold together all other apps. To see more details click here
Hosted URL - link
- 📣 ReactJS,ReactDOM
- 📣 Antd, styled-components - Component library and styling
- 📣 react-router-dom - For handling routes
- 📣 react-google-login - For google authentication
- 📣 recoil - State management
- 📣 axios - HTTP client
- 📣 @uiw/react-md-editor - Markdown editor
- 📣 chart.js,react-chartjs-2 - For charts
- 📣 socket.io-client - Handling socket
To handle backend, a node based server is implemented. To see more details click here
- 📣 ExpressJS - Handling HTTP requests
- 📣 google-auth-library - To get user details from user bearer token
- 📣 redis - To store poll details
- 📣 pg - Database
- 📣 sequelize - An ORM to query with Database
- 📣 socket.io - For real-time connection with client