Skip to content

JumppanenTomi/Cafe-AVA-s-Coffee-Pass

Repository files navigation

Cafe AVA - Coffee Pass

Overview

Cafe AVA - Coffee Pass is a web-based platform designed to provide users with easy access to Cafe AVA's services. Its core feature is serving as a coffee pass for customers, offering rewards based on coffee purchases. Additionally, it includes a coupon feature and various functionalities for employees to manage coupons, stamps, and customer information.

Features

  • Coffee Passport: Customers collect stamps and earn rewards based on coffee purchases.
  • Coupon Feature: Distributes various offers and benefits to customers.
  • Administration Functions: Employees manage coupons, stamps, and customer information.

Screenshots

Landing Page

Home Page

Technology Stack

  • Framework: Next.js
  • Database & Authentication: Supabase

Setting Up Locally

Prerequisites

  • Docker installed
  • Package manager (Brew for MacOS and Linux, Scoop for Windows)

Installation

  1. Clone repository:

      git clone https://github.com/JumppanenTomi/coffee-pass

    or if you are planning to use project in production you should fork it.

  2. Install Docker: Download and install Docker from here.

  3. Install Package Manager:

    • For MacOS and Linux, use Brew.
    • For Windows, use Scoop.
  4. Install Supabase CLI:

    • Using Brew:

      brew install supabase/tap/supabase
    • Using Scoop:

      scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
      scoop install supabase
  5. Login to Supabase CLI and Link Project with Remote (Optional):

    • Sign in to Supabase CLI:

      supabase login
    • Link your local project with the remote project:

      supabase link

Database Setup

  1. Start Supabase Stack: Navigate to your project folder and start the Supabase stack:

    supabase start
  2. Update Environment Variables: Create copy of .env.example file and rename it to .env.local, then copy the anon and service_role keys from the supabase startup prompt and replace them into your .env.local file. Also remove database credential lines from .env.local file.

  3. Pull Latest Database Changes (Optional):

    supabase db pull
  4. Apply latest migration (only if there was changes from remote):

     supabase migration up

Running the Application

  1. Install packages:

    npm install
  2. Start the Application:

    npm run dev
  3. Access the Application: Navigate to http://localhost:3000 to view the application.

  4. Grant Admin Access: After registering in the application, add your user to the user_roles table as an owner or a barista. Access admin features at http://localhost:3000/admin/.

Contributors

  • Tomi Jumppanen
  • Dat Pham
  • Tuomas Heikkilä
  • Anton Tugushi

License

Source code is licensed under the MIT License. However, the use of any Cafe AVA branding, such as logos, is prohibited.