Skip to content

BACK EMAIL HOME GROUP 4 UPDATES BY HOME GROUP 3#10

Open
jubuenor wants to merge 8 commits into
mateopal09:mainfrom
G3-VER-TECH-FELLOWS:main
Open

BACK EMAIL HOME GROUP 4 UPDATES BY HOME GROUP 3#10
jubuenor wants to merge 8 commits into
mateopal09:mainfrom
G3-VER-TECH-FELLOWS:main

Conversation

@jubuenor

Copy link
Copy Markdown

Why this PR?

The original code presented improvement opportunities, which we identified and implemented. Specifically, the project's front end underwent updates in ESLint, Docker, Nginx integration, and CI/CD pipelines, while the backend addressed technical issues and standardized modules. Emphasizing infrastructure as code (IAC) with tools like Terraform and Ansible enhances scalability and operational efficiency for evolving businesses.

What Changed?

Frontend Changes Overview

  • Removed .dockerignore file, which included various Python, Git, and environment-specific files to ignore during Docker builds.
  • Added a new ESLint configuration file .eslintrc.cjs focusing on TypeScript and React rules.
  • Introduced Continuous Deployment (CD) and Continuous Integration (CI) pipelines with GitHub Actions, specified in .github/workflows/cd.yml and .github/workflows/ci.yml.
  • Updated the Docker configuration, introducing a multi-stage build in Dockerfile for optimizing the build process.
  • Added a docker-compose.yml file for defining and running multi-container Docker applications, setting up the project with specific ports and environment variables.
  • Configured Nginx for serving the application through a new default.conf file.
  • Updated index.html to serve as the entry point for the web application, including references to the main JavaScript file and the project's title.
  • Significant updates to package.json, including changes to project name, version, scripts, dependencies, and development dependencies.
  • Introduced postcss.config.js for PostCSS configuration, enabling plugins like Tailwind CSS and Autoprefixer.
  • Refactored code across various components (ComposeView.tsx, InboxView.tsx, Message.tsx, etc.) for improvements and removal of unused imports.
  • Adjustments in context files (SelectedEmailContext.tsx, UserContext.tsx, etc.) and icon components to clean up imports and code structure.
  • API configuration changes in src/api.ts to point to new backend endpoints.
  • File structure changes, including the renaming of src/index.tsx to src/main.tsx and addition of src/vite-env.d.ts for Vite-specific types.
  • Created a startup script start.sh for setting up environment variables and starting Nginx in Docker containers.
  • Updated Tailwind CSS configuration in tailwind.config.js for simplifying the setup.
  • Overhauled TypeScript configuration in tsconfig.json and added tsconfig.node.json for specific settings related to Node.js environments.
  • Introduced a Vite configuration file vite.config.ts for customizing the build process and integrating React with SWC.

Backend Changes Overview

  • Code is modified MyUserManager class to encrypt the password.
  • The views are separated into a module with independent files as controllers.
  • The code that calls the actions in the database in the login and send_email.
  • Controller are organized into service modules.
  • The service_send_email code is simplified by validating the code with try and except
  • APIs are documented using swagger, modifying the project setting.
  • Changing the connection from postgres to mysql to a rds instance in AWS.
  • Docker compose is updated and the creation of the db is skipped
  • .env folder is created to hold sensitive keys
  • python decouple` is installed to manage the enviroments variables
  • .dockerignore is update with .env file
  • Setting update to add the new DNS and connections to the database located in AWS

IAC Implementation Overview

Infrastructure as Code (IAC) implementation with Terraform and Ansible offers numerous benefits for businesses, including streamlined deployment, enhanced performance, and cost savings. By automating infrastructure provisioning and management, organizations can achieve greater efficiency, scalability, and agility in their operations. Regular monitoring and optimization are essential for maximizing the effectiveness of the implemented solution and ensuring ongoing success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants