🚀 Setting Up a New Project? Here’s Your Complete Checklist! 🚀

Photo by Chris Ried on Unsplash

🚀 Setting Up a New Project? Here’s Your Complete Checklist! 🚀

·

3 min read

Being developers, we always wanted to start projects from scratch. When we get the opportunity, we keep thinking about where to start. In this article, I am collecting all the points that we want to remember while setting up the initial code setup.

  • Create a minimal branching strategy: While doing the setup, we must create at least two branches: one branch [master/main] and a second branch [development/dev]. Keep the main branch for production and the development branch for daily development purposes.

  • Selecting a programming language: The choice of programming language can affect the project's current development and future aspects. For example, web frameworks like Flask and Django can provide rapid development due to their robust frameworks. If we need high-performance real-time data processing, then selecting Go or Rust can be a better choice.

  • Folder structure: This plays an important role in managing the project in the long run. Some languages have a strict, defined folder structure, like Django, but others may not, like Flask. For such projects, we can follow MVC architecture.

  • Persistent DB connection: Create one connection at the start of running the project and use it across the whole project for any DB-related operations. Creating multiple DB connections in normal scenarios can lead to a write inconsistency problem.

  • Logs: Logs are important for debugging while developing, and they are also very crucial for analyzing production issues.

  • .gitignore File: A .gitingore file contains all lists of files and folders that we want to exclude from the git version history. Eg. virtual environment folder, IDE/edit specific files, python cache files, node_modules from nodeJs app, build files, etc

  • Config Files: Development code goes through multiple stages like local development, dev server, stage server, and production server. Most likely, we will have different settings for each stage. Eg. db credentials, backend server URL, etc. Creating config files for each stage and differentiating the settings is important.

  • .env File: Avoid placing credentials like passwords, API keys, or secret codes directly into config files, which get tracked by version control systems like Git. Instead, store sensitive information in an environment file (.env) and load these values into your application securely.

  • Storing Libraries and Dependencies: It is better practice to store all dependent libraries or packages within the project so that anyone who pulls the project can install dependencies in one shot. In Python, we generally create requirements.txt and store all required dependent packages in it. In Javascript projects, we have a file named package.json to manage such dependencies.

  • Virtual environment: A virtual environment is created to separate dependencies of your current project from either another project you are working on or a system’s global library environment. Each project may need a specific version of packages to execute, and it may conflict if we use a global workspace to install dependencies across all the projects. In Python, we create virtual environments using venv/virtualenv libraries. In Javascript, while installing packages, we should not use -g. Without it, it will create a local node_modules folder for each project.

  • .dockeringore File: It is the same as a .gitingnore file, but the only difference is it will skip the files and folders while building Docker images. This act can reduce the size of an image drastically.

Remember these points while creating a new project from scratch.

Happy Learning. 😊

#SoftwareDevelopment #Python #Flask #Django #DevOps #Docker #ProgrammingTips #Git #WebDevelopment

Â