Building any Project

Lakshay GargLakshay Garg
4 min read

INTRODUCTION

Starting a new project can be both exciting and daunting. There are a lot of things that you need to define before you start working on a project.

There are several problems that you might encounter if you start a project immediately, like:

  1. Takes a lot more time than expected: Projects often reveal complexities during the implementation phase that were not clear during the ideation phase.

  2. Creation of different models that would be tough to change later: If data models are designed without considering future scalability or changes in requirements, they may become rigid and resistant to modifications.

  3. Difficulty in scaling: Inefficient design choices or architectural constraints can hinder the project's ability to scale seamlessly. Identifying and addressing performance blocks requires careful analysis and architectural changes. Hence we should define them before we begin coding.

In the next part of this blog, we'll discuss essential planning steps to address these challenges.

1. Feature Planning: Define Your Needs

Understanding your project's requirements is the first step of successful planning. For smaller projects aimed at showcasing skills, just the important features are enough. However, for larger projects, invest ample time in this phase. Define features precisely, outlining inputs and outputs. For instance:

  • PayTM-like app: Authentication, Withdrawal, Wallet, Money Transfer, Vendor Dashboard.

  • Blind-like platform: Authentication, Review and Rating, Comments with Upvotes/Downvotes, Verification.

2. Design UI/UX

Large companies might have dedicated design teams that develop intricate designs catering to the needs of the company. Hence, as a developer, focus primarily on functionality, especially for personal projects. For design, I would suggest:

  • Utilizing existing designs from prominent websites.

  • Leveraging external libraries like Material UI and Bootstrap that provide you with predefined designs.

3. High-Level Design

High-Level Designs include establishing the foundational elements of your project. It includes defining all the technologies that you will be using in your project.

  • Authentication

    Choose between in-house solutions or third-party providers like Google or Meta.

  • Database

    Opt for MongoDB for simplicity or Prisma for ORM if you are not focusing on your SQL skills.

  • Backend Stack

    The backend stack heavily depends on your development needs. Python for rapid development or HONO with Cloudflare Workers for easy deployment. Or you can simply use Node JS.

  • Frontend Stack

    React remains a popular choice for front-end development. You can also use Next Js if you wish to have SEO on your website or other frameworks such as Angular. Choose frontend technologies based on factors like performance, developer familiarity, and project requirements.

  • Modules

    Create common modules for reusability. Modular design promotes code organization, simplifies maintenance, and accelerates development. For example, if you have multiple frontends, you can have a common UI module. You can have your input/output types which will be common for frontend and backend. You can define your database that will be used between multiple backends.

4. Low-Level Design

A. Schema

Defining the schema involves identifying and designing the various models required for your application. Additionally, you need to establish the relationships between these models to ensure data integrity throughout the system. For example:

  • PayTM-like app: Models may include Users, Merchants, AuthTypes, and more.

  • Blind-like platform: Models might encompass Users, Posts, Companies, and other relevant entities essential for the platform's functionality.

B. Route Signatures

Route signatures define the paths and endpoints necessary for your application's API. Adhering to conventions, it's customary to begin with a standardized prefix, such as /api/v1/, followed by the model name. Furthermore, you specify the HTTP request methods supported by each route, including POST, GET, DELETE, PUT, etc.

5. Managing Complexity: Finding the Right Balance

When managing complexity in your project, it's essential to strike the right balance based on the project's scale and organizational needs:

  • For personal projects

    Prioritize speed and flexibility to quickly bring your ideas to life. Simplify your architecture and workflows.

  • For larger companies

    More extensive projects may require intricate structures with different frontends and backends for several user roles and functionalities. This approach facilitates better organization, scalability, and maintainability.

Let's consider a Paytm-like application as an example. A complex application might include:

  1. Separate frontends for users and merchants.

  2. A Node.js backend dedicated to merchant-related functionalities.

  3. A common backend handling shared functionalities such as authentication, transaction processing, and database management.

  4. A dedicated backend module for user withdrawal operations, streamlining financial transactions, and ensuring compliance with regulatory requirements (the Banks).

In contrast, a simpler application may include just a backend and a frontend.

CONCLUSION

Proper planning saves hours of development time. By addressing key considerations upfront, you can streamline the development process and set the stage for a successful project. Define these aspects before starting your next project and share your experience.

Thank you for reading and happy coding!

14
Subscribe to my newsletter

Read articles from Lakshay Garg directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Lakshay Garg
Lakshay Garg