TrustVote
Project Overview
TrustVote is an innovative blockchain-powered voting system designed to streamline and enhance the voting process, ensuring seamless and highly secure elections. Leveraging state-of-the-art technologies such as Microservices, Flask, Kubernetes, and React.js, TrustVote is poised to revolutionize the way we conduct and manage voting, providing a robust and efficient platform for democratic processes.
This project aims to explore Kubernetes and microservices in the backend. It is divided into two main components: the client-side and the server-side. The structure of the project includes configurations for development, production, and staging environments.
Folder Structure
+---client
| +---config
| +---public
| +---src
+---infra
| +---compose
| +---Dockerfiles
| +---k8s
| | +---common
| | +---dev
| | +---prod
| | +---server
| +---skaffold
+---server
| +---.vscode
| +---app
| | ...
| | +---cron
| | +---queues
| | +---routes
| | +---services
| | +---swagger
| | +---utils
| | +---workers
| +---connections
| +---db
Client
The client folder contains the frontend code. Notable directories and files include:
- config: Webpack configuration files for different environments.
- public: Public assets and HTML files.
- src: Source code organized into components, constants, context, guards, hooks, routes, and services.
Infra
The infra folder includes configurations for deployment and orchestration:
- compose: Docker Compose configurations for development and production.
- Dockerfiles: Dockerfiles for different components of the system.
- k8s: Kubernetes manifests for various environments.
Server
The server folder contains the backend logic. Key directories and files are:
- .vscode: Visual Studio Code configurations.
- app: Server-side application logic organized into common, consumer, cron, handler, middlewares, models, queues, routes, services, swagger, and utils.
- connections: Initialization scripts for Kafka, PostgreSQL, and Redis.
- db: Database-related files, including migrations.
- scripts: Shell scripts for running the server in different environments.
- spec: Testing specifications and utilities.
- tools: Tools related to code coverage.
Getting Started
To get started with the project, follow these steps:
- Client Setup:
- Navigate to the
clientfolder. - Install dependencies using
npm installoryarn install. - Follow the instructions in the client's README for further setup.
- Navigate to the
- Server Setup:
- Navigate to the
serverfolder. - Install dependencies using
npm installoryarn install. - Set up the database by running migrations using
npm run migrateoryarn migrate. - Follow the instructions in the server's README for further setup.
- Navigate to the
- Infrastructure Setup:
- Navigate to the
infra/skaffoldfolder. - Follow the instructions in the infra's README for setting up Docker and Kubernetes.
skaffold run -p devfor running in development modeskaffold run -p prodfor running in production mode
- Navigate to the
Built With
- blockchain
- docker
- flask
- gunicorn
- ingress
- kubernetes
- node.js
- postgresql
- python
- react
Log in or sign up for Devpost to join the conversation.