During these weeks, we developed a wallet application using TypeScript to ensure strict type safety throughout the project. The tech stack included Next.js for both the frontend and backend of the main app, Express for building an auxiliary webhook service, PostgreSQL as the database, Prisma as the ORM, NextAuth for authentication, and Tailwind for styling. The project components were maintained as a monorepo using Turborepo. We utilized Docker and GitHub Actions to create a simple CI/CD pipeline.
We started by sketching a high-level system design and discussing how the various services would interact. This was followed by designing the UI elements of the different components. We decided to use phone numbers for user authentication and identification.
Database modeling was done to support the wallet's features. We utilized database transactions to ensure integrity according to ACID properties during wallet operations.
We developed a webhook to enable third-party services to communicate with our app. This included spoofing a request from a bank server to simulate communication about the success or failure of money transfers.
We then focused on Continuous Integration (CI) and Continuous Deployment (CD). Continuous Integration (CI) is a practice where developers frequently merge code changes into a shared repository, triggering automated build and testing processes. Continuous Delivery (CD) extends CI by ensuring the software can be released to production at any time, involving the automatic deployment of the integrated code to a server.
For our CI/CD pipeline using GitHub Actions, firstly (CI) we implemented linting checks on every new pull request to prevent unnecessary conflicts during merges. For the CD part, we wrote a GitHub Action to containerize the project and push it to my DockerHub account. It then connects to my AWS EC2 machine, pulls the latest image from DockerHub, and runs it as a container with relevant port mappings and environment variables.
Overall, this project provided hands-on experience in end-to-end development, covering system design, UI design, database modeling, authentication decisions, database migrations, and building a seamless integration and deployment pipeline using CI/CD practices.
You can explore the source code in my GitHub repo here: https://github.com/aviralvardiya/paytm-clone