- Table of Contents
- Overview
- Features
- repository Structure
- Modules
- Getting Started
- Roadmap
- Contributing
- License
- Acknowledgments
BASKARYA is an innovative project that revolves around the rich cultural heritage of batik, a traditional Indonesian art form. The project encompasses a web application and an API, providing a platform for users to explore, bookmark, and engage with batik-related content. Leveraging machine learning capabilities, BASKARYA offers additional features for image analysis and recognition...
- Get Batik by ID: Retrieve detailed information about a specific batik using its unique identifier.
- Get Batik by Wrong ID: A sample endpoint showcasing error handling for incorrect batik identifiers.
-
Post Bookmark Batik: Allow users to bookmark their favorite batik designs by uploading an image file.
-
Get Bookmark Batik by User: Retrieve a user's bookmarked batik designs using their username.
-
Delete Batik Bookmark by User: Remove a batik design from a user's bookmarks using their username and batik ID.
- Search Batik by Keyword: Search for batik designs based on keywords, facilitating a user-friendly exploration experience.
The BASKARYA API is designed to be developer-friendly, offering a range of endpoints for seamless integration into applications and services. Developers can explore batik details, implement bookmarking functionality, enable search capabilities, and leverage machine learning for image analysis.
Contributions to the BASKARYA project are welcome! Whether you are interested in adding new features, fixing bugs, or improving documentation, please follow the contribution guidelines outlined in the CONTRIBUTING.md file.
To get started with the BASKARYA project, refer to the API Documentation for comprehensive details on available endpoints, request formats, and response structures.
For more detail API Documentation, Documentation.
https://documenter.getpostman.com/view/25932120/2s9YkkfNgo#928f8e75-8575-4d6a-b4d7-9809e002a748
https://baskarya-app-veuznuhx2a-et.a.run.app/
Endpoint.
GET http://{{endpoint}}/api/batik/:id
- Method: GET
- URL:
http://{{endpoint}}/api/batik/:id - Parameters:
id(Path Parameter): The unique identifier of the batik.
GET http://{{endpoint}}/api/batik/:id
- Method: GET
- URL:
http://{{endpoint}}/api/batik/:id - Parameters:
id(Path Parameter): Incorrect batik identifier.
POST http://{{endpoint}}/api/bookmarks/batik
- Method: POST
- URL:
http://{{endpoint}}/api/bookmarks/batik - Body:
file(Form Data): Batik image file to bookmark.
GET http://{{endpoint}}/api/bookmarks/batik/:username
- Method: GET
- URL:
http://{{endpoint}}/api/bookmarks/batik/:username - Parameters:
username(Path Parameter): User's username.
DELETE http://{{endpoint}}/api/bookmarks/:username/:batikId
- Method: DELETE
- URL:
http://{{endpoint}}/api/bookmarks/:username/:batikId - Parameters:
username(Path Parameter): User's username.batikId(Path Parameter): Identifier of the batik to be removed from bookmarks.
GET http://{{endpoint}}/api/search/batik
- Method: GET
- URL:
http://{{endpoint}}/api/search/batik - Parameters:
keyword(Query Parameter): Keyword for batik search.
└── express-backend/
├── app.js
├── config/
│ └── firebaseConfig.js
├── controllers/
│ ├── articleController.js
│ ├── batikController.js
│ ├── bookmarkController.js
│ ├── searchController.js
│ └── customController.js
├── exceptions/
│ ├── AuthorizationError.js
│ ├── ClientError.js
│ ├── InvariantError.js
│ └── NotFoundError.js
├── middleware/
│ └── loggingMiddleware.js
├── package-lock.json
├── package.json
├── router/
│ ├── articlesRouter.js
│ ├── batikRouter.js
│ ├── bookmarkRouter.js
│ ├── searchRouter.js
│ └── customRouter.js
├── services/
│ └── firestore/
│ ├── ArticlesService.js
│ ├── BatikService.js
│ ├── BookmarksService.js
└────── └── CustomService.js
Root
| File | Summary |
|---|---|
| package-lock.json | HTTPStatus Exception: 404 |
| app.js | HTTPStatus Exception: 404 |
| package.json | HTTPStatus Exception: 404 |
Router
| File | Summary |
|---|---|
| batikRouter.js | HTTPStatus Exception: 404 |
| searchRouter.js | HTTPStatus Exception: 404 |
| bookmarkRouter.js | HTTPStatus Exception: 404 |
| articlesRouter.js | HTTPStatus Exception: 404 |
| customRouter.js | HTTPStatus Exception: 404 |
Middleware
| File | Summary |
|---|---|
| loggingMiddleware.js | HTTPStatus Exception: 404 |
Controllers
| File | Summary |
|---|---|
| batikController.js | HTTPStatus Exception: 404 |
| bookmarkController.js | HTTPStatus Exception: 404 |
| articleController.js | HTTPStatus Exception: 404 |
| searchController.js | HTTPStatus Exception: 404 |
| customController.js | HTTPStatus Exception: 404 |
Firestore
| File | Summary |
|---|---|
| ArticlesService.js | HTTPStatus Exception: 404 |
| BookmarksService.js | HTTPStatus Exception: 404 |
| BatikService.js | HTTPStatus Exception: 404 |
| CustomService.js | HTTPStatus Exception: 404 |
Config
| File | Summary |
|---|---|
| firebaseConfig.js | HTTPStatus Exception: 404 |
Exceptions
| File | Summary |
|---|---|
| ClientError.js | HTTPStatus Exception: 404 |
| AuthorizationError.js | HTTPStatus Exception: 404 |
| InvariantError.js | HTTPStatus Exception: 404 |
| NotFoundError.js | HTTPStatus Exception: 404 |
Dependencies
Please ensure you have the following dependencies installed on your system:
Below are the dependencies used in this Express API project, each serving a specific purpose:
-
express (
^4.18.2): Fast, unopinionated, minimalist web framework for Node.js. -
body-parser (
^1.20.2): Node.js body parsing middleware, used to parse incoming request bodies. -
axios (
^1.6.2): Promise-based HTTP client for the browser and Node.js, facilitating the making of HTTP requests. -
firebase-admin (
^11.11.1): Firebase Admin SDK for Node.js, providing the necessary tools for managing Firebase services. -
@google-cloud/storage (
^7.7.0): Google Cloud Storage client library for Node.js, enabling interaction with Google Cloud Storage. -
multer (
^1.4.5-lts.1): Middleware for handlingmultipart/form-data, used for file uploads. -
bcrypt (
^5.1.1): Library for hashing passwords, enhancing the security of user authentication. -
sharp (
^0.33.1): High-performance image processing library, useful for resizing and manipulating images. -
nanoid (
^3.3.7): A tiny, secure, URL-friendly unique string ID generator. -
node-fetch (
^3.3.2): Lightweight module for making HTTP requests, compatible with the Fetch API.
- nodemon (
^3.0.2): Utility that monitors for changes in your source code and automatically restarts your server.
Please refer to package.json for more details on versioning and additional information about the project's dependencies.
- Clone the express-backend repository:
git clone https://github.com/Baskarya/express-backend- Change to the project directory:
cd express-backend- Install the dependencies:
npm installnode app.jsnpm test
ℹ️ Task 1: Article APIℹ️ Task 2: Batik APIℹ️ Task 3: Bookmark APIℹ️ Task 4: Search APIℹ️ Task 5: Customization API
Contributions are welcome! Here are several ways you can contribute:
- Submit Pull Requests: Review open PRs, and submit your own PRs.
- Join the Discussions: Share your insights, provide feedback, or ask questions.
- Report Issues: Submit bugs found or log feature requests for ROUTINEE66.
Click to expand
- Fork the Repository: Start by forking the project repository to your GitHub account.
- Clone Locally: Clone the forked repository to your local machine using a Git client.
git clone <your-forked-repo-url>
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear and concise message describing your updates.
git commit -m 'Implemented new feature x.' - Push to GitHub: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
Once your PR is reviewed and approved, it will be merged into the main branch.
This project is protected under the SELECT-A-LICENSE License. For more details, refer to the LICENSE file.
- List any resources, contributors, inspiration, etc. here.