Laundry API is a project for developing an API using ExpressJS and TypeScript language for a laundry service application. This API provides endpoints for managing customers, orders, and users.
Laundry service businesses often face challenges in efficiently managing their operations, ranging from customer data management to order processing and user authentication. The absence of a streamlined system can lead to various issues, such as:
-
Inefficient Customer Management: Without a centralized system, tracking customer information, preferences, and order history becomes challenging, leading to a less personalized customer experience.
-
Order Processing Complexity: Manual order processing can result in errors, delays, and a lack of transparency in the order fulfillment process. This can lead to customer dissatisfaction and operational inefficiencies.
-
Security Concerns: Handling sensitive customer information requires a secure authentication and authorization system. Without robust security measures, the business is vulnerable to data breaches and unauthorized access.
-
Lack of Scalability: As the business grows, manual and traditional methods of managing operations become less scalable. An adaptable solution is needed to accommodate increasing data volumes and user interactions.
-
Code Maintainability: Developing a maintainable codebase is crucial for the long-term success of the application. Without a structured approach, code becomes harder to maintain and prone to errors.
- Customer Management Efficiently manage customer data, including their personal information, addresses, phone numbers, and payment details. This feature enhances customer interaction and provides a basis for personalized services.
- User Authentication Implement a secure user authentication system to protect sensitive data and ensure that only authorized users can access and modify information. This feature helps address security concerns related to customer data.
- Code Maintainability Adopt best practices for coding to ensure a maintainable and readable codebase. This feature facilitates easier debugging, updates, and modifications to the application in the future.
- Order History Provide a comprehensive order history for customers, allowing them to track their previous orders. This feature enhances customer satisfaction and loyalty by providing transparency and convenience.
- Role-Based Access Control Implement role-based access control to manage user permissions effectively. This feature ensures that only authorized personnel, such as administrators, have access to certain functionalities, enhancing overall system security.
- API Endpoints Create well-documented API endpoints for seamless integration with frontend applications or third-party services. This feature promotes interoperability and allows for the expansion of the system's functionalities.
- Make sure you have installed
npmandnode json your device - Clone this repository with this command :
git clone https://github.com/riyanthi25/laundry-api.git - Open the project folder in your favorite code editor
- Open your terminal and install the dependencies with
npm installornpm i, it's just the same way to installing all the dependencies - Duplicate the
.env.examplefile and name it.env. Set environment variables such as the database URL, port, and secret key according to your needs. - Run seeder in
seeder.tsfile withnpx ts-node ./prisma/seeder.tsif you have any problems when running the seeder you may install thets-nodewith this commandnpm install -g ts-node - You can run the project with
npm run dev