
A Freelance Project for an Enterprise

Aman Suryavanshi
Passionate web developer and designer with expertise in creating functional, user-centric digital experiences using modern technologies like React, Tailwind CSS, and JavaScript.
Barkat Enterprise: A Freelance Project for an Enterprise
Welcome to the official blog post for Barkat Enterprise, a comprehensive web application designed and developed as a freelance project for an enterprise. This project embodies modern web development techniques, showcasing innovation, scalability, and robust performance to streamline business operations.
In this post, weβll provide a deep dive into the technologies used, detailed solutions to challenges faced during development, and key features implemented to make this platform successful.
π Links
- πΒ Access the App: Barkat Enterprise
- π»Β View the Code: View Source Code
Technologies and Tools Used
The development of Barkat Enterprise required an extensive stack of modern technologies and tools to ensure an exceptional user experience and robust functionality:
Frontend Development
- π₯οΈ React.js
- A JavaScript library for building responsive and interactive UIs.
- Utilized for creating modular, reusable components.
- π¨ Tailwind CSS
- A utility-first CSS framework that allows for rapid UI development with clean and customizable styling.
Additional Libraries
- β³ React LazyLoad
- Installed using
npm install react-lazyload
to implement lazy loading for images, optimizing performance by loading only visible elements.
- Installed using
- π οΈ React Icons
- Simplifies icon usage, ensuring scalability and design consistency across components.
- π PDFJS-Dist
- Installed via
npm install pdfjs-dist
to render and display PDF files directly on the website, enhancing the user experience.
- Installed via
Deployment and Analytics
- π Vercel
- Used for seamless CI/CD deployment and hosting.
- Integrated Vercel analytics by installing the Vercel npm package and adding analytics script tags in the HTML for performance monitoring.
Project Overview
Barkat Enterprise was developed as a full-fledged business solution for showcasing product catalogs, streamlining customer interactions, and enhancing user engagement. Key aspects of the project include:
- π Product Catalog: A detailed showcase of products with images and downloadable PDF catalogs.
- π± Responsive Design: Ensures an optimal user experience across devices (desktop, tablet, and mobile).
- β‘ Enhanced Performance: Features like lazy loading for images and optimized asset management to reduce load times.
Below is a code snippet demonstrating the catalog generation using dynamic template literals:
const catalogues = {
catalogue1: {
name: '1Γ1.5 BARKAT ENTERPRISE',
images: Array.from({ length: 29 }, (_, i) => `/public/assets/Catalogue/1X1.5 BARKAT ENTERPRISE/${i + 1}.webp`),
pdfPath: '/public/assets/Catalogue/1X1.5 BARKAT ENTERPRISE (ALL)_compressed.pdf'
},
};
Key Features
Secure Contact Integration
- π§ Email.js Integration:
- Easily configured templates for seamless email communication.
- Provides secure and efficient real-time messaging capabilities.
- Facilitates automation of email delivery with minimal setup.
Image Optimization
πΌοΈ Optimizing Image Deployment:
- Problem: Large file sizes like JPEG and JPG were slowing down deployment and loading times.
- Solution: Converted images to WebP format for faster loading and better performance. Additionally, moved the
assets
folder to thepublic
directory and referenced images directly:
Real-Time Updates and Lazy Loading
- β³ Leveraged React LazyLoad to load elements only when they come into the viewport, optimizing resource usage and performance.
PDF Integration
- π Used PDFJS-Dist to render product catalogs directly on the site, allowing users to view and download PDFs seamlessly.
Challenges Faced
1. Image Path Issues on Vercel
- Problem: Images were not loading on the deployed site due to incorrect asset referencing.
- Solution:
- Moved all image files to the
public
directory and updated paths to reference assets directly:
- Moved all image files to the
2. Page Refresh Error on Vercel
- Problem: Refreshing or directly accessing a route like
/products
resulted in a 404 error. - Solution:
- Added a rewrite rule in the
vercel.json
file to serve theindex.html
file for all routes:
- Added a rewrite rule in the
{
"rewrites": [
{ "source": "/(.*)", "destination": "/" }
]
}
3. Dynamic Asset Loading
- π Used template literals to dynamically generate paths for assets such as product images and catalogs.
4. Seamless Contact Integration
- π§ Integrated Email.js for secure and efficient communication with customers, enabling real-time message delivery.
Deployment and Testing
Deployment
- π Vercel was chosen for its:
- Automatic CI/CD pipelines for rapid updates.
- Global edge network for fast and reliable delivery.
Testing
- β
Conducted a comprehensive testing process:
- Unit Testing: Validated individual components using Jest.
- Integration Testing: Verified workflows and API interactions using Postman.
What I Learned
This freelance project offered invaluable lessons in:
- πΌοΈ Asset Management: Addressing deployment challenges with Vercel by optimizing image paths and directory structures.
- β‘ Performance Optimization: Implementing lazy loading and utilizing the public directory for assets.
- π Advanced Deployment Techniques: Resolving SPA-related issues by configuring rewrite rules in
vercel.json
. - π Dynamic Code Practices: Using modern JavaScript techniques, such as template literals, for scalable and efficient code.
Future Improvements
To further enhance Barkat Enterprise, the following improvements are planned:
- π€ AI-Powered Analytics: Integrating machine learning to provide actionable insights from customer interactions.
- π Multi-Language Support: Expanding accessibility by offering the platform in multiple languages.
- π Advanced Role-Based Access Control (RBAC): Implementing granular user permissions for enhanced security.
Conclusion
Barkat Enterprise is a prime example of modern web development tailored to meet enterprise needs. Developed as a freelance project, it seamlessly integrates React, Tailwind CSS, and Vercel to deliver a robust, scalable, and user-friendly platform.
Explore the complete codebase on the GitHub Repository.
FAQs
- What technologies were used in this project?
- π₯οΈ React.js, π¨ Tailwind CSS, π Vercel, β³ React LazyLoad, π οΈ React Icons, and π PDFJS-Dist.
- What were the challenges faced during development?
- Issues with πΌοΈ image paths, β‘ route refresh errors, and π dynamic asset management.
- How were images optimized for deployment?
- By relocating them to the
public
directory and using direct paths.
- By relocating them to the
- Is the project scalable for large businesses?
- Yes, itβs designed to handle enterprise-level requirements efficiently.
- Whatβs next for Barkat Enterprise?
- π€ AI analytics, π multi-language support, and π enhanced security features.
Let's Create Something Amazing Together!
Whether you have a project in mind or just want to connect, I'm always excited to collaborate and bring ideas to life.
Continue the Journey
Thanks for taking the time to explore my work! Let's connect and create something amazing together.