Documentation Index
Fetch the complete documentation index at: https://mintlify.com/zulfikarrosadi/juadah-backend/llms.txt
Use this file to discover all available pages before exploring further.
Get started with Juadah API
This guide will help you set up the Juadah API locally and make your first API request. You’ll have a working API server running in just a few minutes.Clone the repository
First, clone the Juadah backend repository to your local machine:
Make sure you have Node.js v20 or higher installed on your system.
Install dependencies
Install all required npm packages:This will install all dependencies including:
- Express for the web framework
- Prisma for database ORM
- TypeScript for type safety
- Zod for validation
- And other essential packages
postinstall script will automatically run prisma generate to create the Prisma client.Configure environment variables
Create a Then configure the following required variables in your
.env file in the root directory by copying the example file:.env file:.env
Set up the database
Make sure PostgreSQL is running, then run the Prisma migrations to set up your database schema:This will create all necessary tables including:
users- User accounts with authenticationproducts- Bakery products catalogorders- Customer orders and transactionsratings- Product reviews and ratingsadresses- Customer delivery addresses
Make your first API call
Now that your server is running, let’s make your first API call by registering a new user.Register a new user
Use this curl command to create a new user account:Login to get access tokens
After registering, login to receive JWT tokens:Fetch products (authenticated request)
Use the access token from the login response to fetch products:Explore the API documentation
The Juadah API includes built-in Swagger documentation. Once your server is running, visit:- Explore all available endpoints
- View request/response schemas
- Test API calls directly from your browser
- Understand authentication requirements
Next steps
Authentication Guide
Learn about JWT authentication and refresh tokens
Product Management
Create and manage bakery products with images
Payment Integration
Integrate Midtrans for payment processing
API Reference
View complete API endpoint documentation
Running tests
The Juadah API includes a comprehensive test suite. Run tests with:All tests must pass before merging any pull requests. Write unit tests for any new features you implement.
Development tools
The project includes several helpful npm scripts:Need help?
If you encounter any issues or have questions:- Check the API Reference for detailed endpoint documentation
- Review the Authentication Guide for auth-related issues
- Open an issue on the GitHub repository
- Review the Swagger documentation at
/api/docs