Coder Social home page Coder Social logo

craft_backend's Introduction

HAR Logo

Backend Craft It App

A backend supporting an Android app for recognizing waste materials and converting them into handicrafts.


Sample app

-----------------------------------------------------

๐Ÿ“– Table of Contents

Table of Contents
  1. โžค About The Project
  2. โžค Technology
  3. โžค Folder Structure
  4. โžค Quick Start
  5. โžค Wiki
  6. โžค Contributors
  7. โžค Activities

-----------------------------------------------------

๐Ÿ“ About The Project

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.

Table1: 18 Activities

-----------------------------------------------------

๐Ÿด Technology

The following open source packages are used in this project:

-----------------------------------------------------

๐ŸŒต Folder Structure

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

-----------------------------------------------------

โšก๏ธ Quick start

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! ๐ŸŽ‰

-----------------------------------------------------

๐Ÿณ Deployment quick 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. ๐ŸŽ‰

-----------------------------------------------------

๐Ÿ“– Project Wiki

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.

-----------------------------------------------------

๐Ÿ“œ Contributors

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

Yoga Novaindra

Gymnastiar Alma Ghifari

Gymnastiar Alma Ghifari

-----------------------------------------------------

โญ๏ธ Activities

Activities

-----------------------------------------------------

craft_backend's People

Contributors

yoganovvaindra avatar gymnastiaralmaghifari avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.