MasakMudah REST API is a web service that provides access to a large collection of recipe. It allows users to search for recipe, retrieve recipe details, and publish own recipe also saving another user recipe.
- Hono over Bun runtime
- Typescript
- Prisma ORM
- PostgreSQL
- Render
- Neon
The OpenAPI Specification for the MasakMudah API offers a detailed description of the API's services. It can be accessed at the path /api-spec
.
For a more interactive experience, you can use SwaggerUI. It provides a user-friendly interface for exploring and testing the API. You can access SwaggerUI at /ui
.
You can also access the following:
- OpenAPI Specification: https://masakmudah-backend-ecfl.onrender.com/api-spec
- SwaggerUI: https://masakmudah-backend-ecfl.onrender.com/ui
To view the latest database design in more detail, you can navigate to the following link: ERD
Set up .env
by copying from .env.example
for reference
cp .env.example .env
Install dependencies
bun install
Run DB migration
bun run migrate:dev
Then you can run
bun run dev
Afterwards, open your browser and navigate to http://localhost:3000 to start exploring the API.
Endpoint | HTTP | Permission |
---|---|---|
/users | GET | Public |
/users/:username | GET | Public |
/auth/register | POST | Public |
/auth/login | POST | Public |
/auth/me | GET | Authenticated |
/auth/logout | POST | Authenticated |
Endpoint | HTTP | Permission |
---|---|---|
/categories | GET | Public |
/categories/allCategories | GET | Public |
/categories/create | POST | Authenticated |
/categories/:id | PUT | Authenticated |
/categories/:id | DELETE | Authenticated |
Endpoint | HTTP | Permission |
---|---|---|
/recipes | GET | Public |
/recipes/:slug | GET | Public |
/recipes/create | POST | Authenticated |
/categories/:id | PUT | Authenticated in progres |
/categories/:id | DELETE | Authenticated in progres |