Powellelism / Coffee-Recipe-Management-System

0 stars 0 forks source link

Coffee Recipe management System

Description

This project uses Express.js for the backend Supabase for DB and Prisma for ORM. Cloudflare worker's with Open API schema is used to handle for AI inference. Repo is organized into AI-Worker and web sections. All cloudflare worker code is in Ai-Worker and express js and front end code is in web.

Team Public Video

Directory Structure

Prerequisites

Setup

Setting Up the Express.js Application

  1. Navigate to the src/web directory:
    cd src/web
  2. Install the necessary packages:
    npm install
  3. Create a .env file in the src/web directory and populate it with the necessary environment variables:
    • PORT=
    • API_KEY=
    • API_TEXTGEN_URL=
    • API_IMGGEN_URL=
    • DATABASE_URL=
    • SUPABASE_URL=
    • SUPABASE_KEY=
  4. To start the application locally, run:
    npm run start

Setting Up Cloudflare Worker

  1. Navigate to the worker directory: cd worker
  2. Ensure you have wrangler installed: npm install -g @cloudflare/wrangler
  3. Fill in the .dev.vars with environment variables:
    • API_KEY=
    • CLOUDFLARE_API_TOKEN=
  4. Start the development server using Wrangler: npm run wrangler dev

Continuous Integration

This project uses GitHub Actions for continuous integration, which performs the following upon each push to the repository:

Deployment

To deploy the application:

  1. Push your changes to a feature branch and create a pull request to the deployment branch.
  2. Once the continuous integration checks pass, merge the pull request.
  3. The CI/CD pipeline will automatically deploy your changes to the production environment.