Transform Your Web Experience with Dhruvmistry!
- Overview
- Features
- Project Structure
- Project Index
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:
-
Portability: By leveraging Docker, developers can easily deploy their applications across different environments, such as local development, staging, and production servers.
-
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.
-
Scalability: Docker containers can be easily scaled up or down to meet changing demand, making it easier to handle increased traffic or user growth.
-
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.
Feature | Summary | |
---|---|---|
⚙️ | Architecture |
|
🔩 | Code Quality |
|
📄 | Documentation |
|
📱 | Deployment |
|
└── 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
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(); };1
- Selecting Elements: We select all elements with the classview-animate
usingdocument.querySelectorAll
. 2
- Current Element Index: We initialize a variablecurrentElementIndex
to keep track of which element to animate next. 3
- Staggered Animation: TheanimateNextElement
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 callanimateNextElement
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 themain
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.
You can view my live resume website here: Dhruv Mistry's Resume