A backend supporting an Android app for recognizing waste materials and converting them into handicrafts.
Table of Contents
This project is a backend for an Android application designed to recognize waste materials and transform them into handicrafts. The backend provides essential functionality to support the application, including data management, authentication, and communication with the Android client.
The following open source packages are used in this project:
code
.
โ
โโโ .github
โ โโโ raw_data
โ โโโ raw_data
โ โโโ raw_data
โโโ Key
โโโ Postman
โ โโโ images
| โ โโโ 404.jpg
| โ โโโ aluminium.jpg
| โ โโโ bottle.jpg
| โ โโโ cardboard.jpg
| โ โโโ handicraft.jpg
| โ โโโ paper.jpg
| โ โโโ plastic.jpg
| โ โโโ user.jpg
โ โโโ craft-backend-dev.json
โ โโโ craft-backend.json
โ โโโ CraftBackend.postman_environment.json
โโโ Prisma
โ โโโ migration
โ โโโ client.ts
โ โโโ schema.prisma
โ โโโ seed.ts
โโโ Public
โ โโโ images
โ โ โโโ Project Logo.png
โโโ src
โ โโโ config
โ โ โโโ index.ts
| |
โ โโโ controllers
โ โ โโโ authController.ts
โ โ โโโ dashboardController.ts
โ โ โโโ detailHandicraftController.ts
โ โ โโโ handicraftController.ts
โ โ โโโ healthController.ts
โ โ โโโ historyHandicraftController.ts
โ โ โโโ imageUploadController.ts
โ โ โโโ likeController.ts
โ โ โโโ recognitionController.ts
โ โ โโโ userController.ts
โ โ โโโ wasteController.ts
โ โ โโโ wasteHandicraftController.ts
| |
โ โโโ middleware
โ โ โโโ authMiddleware.ts
โ โ โโโ corsMiddleware.ts
โ โ โโโ handicraftMiddleware.ts
โ โ โโโ historyHandicraftMiddleware.ts
| |
โ โโโ routes
โ โ โโโ authRoutes.ts
โ โ โโโ dashboardRoutes.ts
โ โ โโโ detailHandicraftRoutes.ts
โ โ โโโ handicraftRoutes.ts
โ โ โโโ healthRoutes.ts
โ โ โโโ historyHandicraftRoutes.ts
โ โ โโโ imageUploadRoutes.ts
โ โ โโโ likeRoutes.ts
โ โ โโโ recognitionRoutes.ts
โ โ โโโ userRoutes.ts
โ โ โโโ wasteRoutes.ts
| |
โ โโโ utils
โ โ โโโ bucketimages.ts
โ โ โโโ multer.ts
| |
โ โโโ app.ts
โโโ .gitignore
โโโ deploy.sh
โโโ docker-compose-dev.yml
โโโ docker-compose.yml
โโโ Dockerfile
โโโ express.d.ts
โโโ nodemon.json
โโโ package-lock.json
โโโ package-lock.json
โโโ readme.json
โโโ tsconfig.json
First, clone the repository:
git clone https://github.com/7exp/backend.git
cd backend
Install the necessary dependencies:
npm install
Set up the database:
npx prisma migrate deploy
Start the development server:
npm run nd:start
That's all you need to know to start! ๐
If you want to deploy the project directly to your server, you can follow these steps: ๐
1. Copy the docker-compose.yml file: First, you'll need to copy the docker-compose.yml file from the project's repository to your server. You can do this by running the following command on your server: ๐ฅ
wget https://raw.githubusercontent.com/7exp/backend/main/docker-compose.yml
This will download the docker-compose.yml
file from the repository to your server.
2. Configure environment variables: The project may require some environment variables to be set. You can create a .env file in the same directory as the docker-compose.yml file and add your environment variables there. For example: โ๏ธ
JWT_SECRET=your_secret
DATABASE_URL=mysql://user:password@db:3306/databasename
PROJECT_ID=your_GCP_project_id
BUCKET_NAME=your_GCP_bucket_name
KEYFILENAME=your_GCP_key `keyfile.json`
3. Check the ports: The docker-compose.yml file may specify ports for the containers to bind to on the host machine. Make sure that these ports are not already in use on your server. ๐
4. Install Docker: Before you can run the docker-compose command, you'll need to make sure that Docker is installed on your server. ๐ณ
5. Start the containers: Once you have the docker-compose.yml file, the .env file, and Docker installed, you can start the project's containers by running the following command: ๐
docker-compose up -d
The -d flag tells Docker to run the containers in detached mode (in the background).
This will start the server in the background. ๐
Explore the extensive features and functionalities of Backend Craft It by delving into our comprehensive Wiki. Whether you're new to the project or a seasoned developer, our Wiki offers:
- Detailed Documentation: Learn about every aspect of the backend architecture, from setup to advanced features.
- API Endpoint Descriptions: Understand how to interact with various endpoints for data management and authentication.
Dive into our Wiki today to harness the full potential of Backend Craft It and transform waste materials into beautiful handicrafts seamlessly.
This project is the result of the collaborative efforts of several contributors. ๐ We appreciate the hard work and dedication of the following individuals:
![]() Yoga Novaindra |
![]() Gymnastiar Alma Ghifari |