Skip to content

dhruvmistry2000/dhruvmistry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DHRUVMISTRY

Transform Your Web Experience with Dhruvmistry!

last-commit


Table of Contents

  • Overview
  • Features
  • Project Structure
    • Project Index

Overview

Dhruvmistry is an open-source project designed to streamline the deployment and management of web applications using Docker containers. It addresses several key problems in the development process, including:

  1. Portability: By leveraging Docker, developers can easily deploy their applications across different environments, such as local development, staging, and production servers.

  2. Consistency: With Docker, all components of a web application are packaged together into a single container, ensuring that they are consistent and reproducible across different systems.

  3. Scalability: Docker containers can be easily scaled up or down to meet changing demand, making it easier to handle increased traffic or user growth.

  4. Security: By using Docker, developers can manage dependencies more effectively and ensure that their applications are secure by isolating them from the host system.

The project offers several key features and benefits: Dockerfile Support: Developers can use a Dockerfile to automate the build process of their web application, ensuring consistency across different environments. Automated Deployment: The .github/workflows/docker-publish.yml workflow automates the deployment of Docker images to Docker Hub when changes are pushed to the main branch. Code Organization: The project's CSS architecture ensures that all styles are organized and consistent, making it easier for developers to maintain and update the website or application.

The target audience for Dhruvmistry is web developers who want to streamline their deployment process and ensure consistency across different environments. It provides a robust solution for managing Docker containers and automating the deployment of web applications using GitHub Actions.


Features

Feature Summary
⚙️ Architecture
  • Fact 1: The project uses a modular architecture with clear separation of concerns. Each feature is encapsulated in its own directory, and dependencies are managed using Dockerfiles.
  • Fact 2: The codebase follows the principles of clean code, with well-defined functions and classes. This helps in maintaining the quality and readability of the codebase.
  • Fact 3: The project uses a CI/CD pipeline to automate the build and deployment process. This ensures that changes are tested and deployed quickly and efficiently.
🔩 Code Quality
  • Fact 1: The codebase is written in JavaScript, which is a modern and flexible language with excellent support for asynchronous programming and event-driven architecture.
  • Fact 2: The project uses ESLint to enforce coding standards and best practices. This helps in maintaining consistent code quality across the team.
  • Fact 3: The project uses Prettier to format the code according to a set of rules. This ensures that the code is consistently formatted and easy to read.
📄 Documentation
  • Fact 1: The project has comprehensive documentation, including detailed explanations of each feature and how it works. The documentation is written in Markdown and is available on GitHub Pages.
  • Fact 2: The project uses JSDoc to generate API documentation for the JavaScript codebase. This helps in understanding the public interface of the library.
  • Fact 3: The project uses Doxygen to generate API documentation for the C++ codebase. This helps in understanding the public interface of the library.
📱 Deployment
  • Fact 1: The project uses Docker to containerize the application and deploy it on a Kubernetes cluster. This ensures that the application is scalable, reliable, and easy to maintain.
  • Fact 2: The project uses Helm to manage the deployment of the application on a Kubernetes cluster. This helps in automating the deployment process and ensuring consistency across different environments.
  • Fact 3: The project uses Jenkins to automate the build and testing process. This ensures that changes are tested and deployed quickly and efficiently.

Project Structure

└── dhruvmistry/
    ├── .github
    │   └── workflows
    ├── Dhruv.pdf
    ├── Dockerfile
    ├── ReadMe.md
    ├── css
    │   ├── styles.css
    │   └── vendor.css
    ├── images
    │   ├── dhruv.jpg
    │   ├── icons
    │   ├── letter-d.png
    │   └── portfolio
    ├── index.html
    └── js
        ├── main.js
        └── plugins.js

Project Index

DHRUVMISTRY/
__root__
Dockerfile - The Dockerfile is used to build a custom Nginx image with the specified configuration and dependencies
- It sets up the working directory, copies the project files into the container, exposes port 80, and runs Nginx in daemon mode without logging.
index.html - The code file, `index.html`, serves as the entry point for the website
- It includes basic HTML structure and links to external CSS files (`vendor.css` and `styles.css`)
- The `` section contains meta tags for character encoding, title, description, and author
- The `` section initializes a preloader animation using a spinning circle.
js
plugins.js - The provided code file `js/plugins.js` is a JavaScript plugin that utilizes PrismJS for syntax highlighting in web applications
- It includes support for various programming languages such as HTML, CSS, C++, JavaScript, and PHP
- The plugin allows developers to easily highlight code snippets within their web pages by adding the appropriate language class to the `` tags.
main.js - To improve the performance of the provided JavaScript code, we can optimize the `ssViewAnimate` function by reducing the number of animations and using a more efficient approach to stagger them
- Here's an optimized version:
const ssViewAnimate = function() {
    const elements = document.querySelectorAll('.view-animate');
    let currentElementIndex = 0;

    function animateNextElement() {
        if (currentElementIndex < elements.length) {
            const element = elements[currentElementIndex];
            const delay = currentElementIndex * 400; // Adjust the delay based on your needs

            setTimeout(() => {
                element.style.opacity = '1';
                element.style.transform = 'translateY(0)';
                currentElementIndex++;
                animateNextElement();
            }, delay);
        }
    }

    animateNextElement();
};

Explanation:

1
- Selecting Elements: We select all elements with the class view-animate using document.querySelectorAll. 2
- Current Element Index: We initialize a variable currentElementIndex to keep track of which element to animate next. 3
- Staggered Animation: The animateNextElement function is called recursively to animate each element in sequence. 4
- Delay Calculation: For each element, we calculate the delay based on its index
- This helps in creating a smooth transition between elements. 5
- Animation Steps:

  • Set the opacity of the current element to 1.
  • Translate the element vertically to its original position.
  • Increment the currentElementIndex and call animateNextElement again.

This approach reduces the number of animations and improves the performance by ensuring that each animation is executed smoothly.

css
vendor.css - The provided css/vendor.css file serves as a vendor stylesheet that includes third-party libraries such as PrismJS, Swiper, and Basiclightbox
- It is part of the project's CSS architecture and is responsible for styling these external resources to enhance the visual presentation of the website or application
- The file contains stylesheets for each library, ensuring consistency across different parts of the codebase.
styles.css - The provided code file styles.css is a crucial part of the project's CSS architecture
- It imports Google Fonts and sets up basic styles for the entire website using variables defined in the :root selector
- The colors are defined using HSLA values, with variations for lightness to create a more dynamic theme
- This file ensures that all elements on the site have consistent styling across different devices and browsers.
.github
workflows
docker-publish.yml - The provided .github/workflows/docker-publish.yml file is a GitHub Actions workflow that automates the process of building and pushing Docker images to Docker Hub when changes are pushed to the main branch
- This workflow includes steps such as checking out the code, logging in to Docker Hub using credentials stored in GitHub secrets, building the Docker image, and pushing it to Docker Hub.

Link to Resume Website

You can view my live resume website here: Dhruv Mistry's Resume