ASAH (Aplikasi Sortir Sampah) is an application aimed at encouraging the community to manage waste in an appropriate manner and provides rewards when users successfully manage their waste correctly. In our application, users are required to sort their waste first, and then they can dispose of or donate their waste to recycling agencies in their vicinity.
Here are some of the related repositories which are part of the same project:
| Repository | Link |
|---|---|
| π± Mobile Development | MD Repository |
| π€ Machine Learning | ML Repository |
To access the API documentation, you can visit the following link API Documentation
- After filling in the instance ID and password, scroll down to create the instance
- Change the network to public in order to make it accessible to clients
- Once done, save the changes
- Click on "Create Bucket."
- After clicking "Create," fill in the "Bucket Name" field according to your needs
- In the "Choose how to control access to objects" section, uncheck the "Enforce public access prevention on this bucket" option
- After that, click on "Continue" and then click on "Create"
- Once the bucket is created, click on "Permissions" as it is still set to "Not Public"
- Next, scroll down to "+ Add access control entry" or "+ Grant access" button
-
Add the following entries in the "New principals" section: "allUsers" and "allAuthenticatedUsers." Set the role as "Storage Viewer"
-
Click on "Save" and you're done
- Search βGoogle Maps β pada bagian search di GCP
- Click on the "APIs" section and scroll down until you find the "Additional APIs" section
- Choose the desired API from the available options
- Once you have made your selection, click on it, and then click on "Enable"
- Then, navigate to the "Credentials" section and choose the Google Maps Platform API for which you want to create a key
- Once done, click on the "+CREATE CREDENTIALS" button
- After clicking "+CREATE CREDENTIALS"
- Select "API key" and start creating the API key
- After that, the API key will appear
- The API key has been handed over to the MD team for their use
- Clone the repository from the existing repo:
git clone https://github.com/your-repo.git- Setting up a Dockerfile for deployment
FROM python:3.11-slim
ENV PYTHONUNBUFFERED True
ENV APP_HOME /app
WORKDIR $APP_HOME
COPY . ./
ENV PORT 1234
ENV MYSQL_URL "mysql+pymysql://root:PASSWORD@SERVER-IP:PORT/NAME DATABASE"
ENV JWT_SECRET_KEY "SECRET KEY"
ENV JWT_REFRESH_SECRET_KEY "REFRESH SECRET KEY"
RUN pip install --no-cache-dir -r requirements.txt
CMD exec uvicorn main:app --host 0.0.0.0 --port ${PORT}- Click on "Create Service"
- Select "Continuously deploy new revisions from a source repository" to create CI/CD (Continuous Integration/Continuous Deployment)
- Connect to GitHub and select the desired repository
- Next, choose "Build Configuration" with Dockerfile
- Then, leave everything else as default, and in the authentication section, select "Allow unauthenticated invocations" to make it accessible to the public
- Once you have selected "Allow unauthenticated invocations," click on "Create"
- After that, the website will be successfully deployed.
- To test the deployed application, you can use tools like
curlor API testing tools like Postman. Here is an example of how to test the API usingcurl:
curl -X GET https://your-app-url.com/api/endpoint-
Replace
your-app-url.comwith the actual URL of your deployed application and/api/endpointwith the desired endpoint to test. -
You can also use Postman to send requests to the API and verify the responses.





















