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.
- 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.
- Framework: Next.js
- Database & Authentication: Supabase
- Docker installed
- Package manager (Brew for MacOS and Linux, Scoop for Windows)
-
Clone repository:
git clone https://github.com/JumppanenTomi/coffee-pass
or if you are planning to use project in production you should fork it.
-
Install Docker: Download and install Docker from here.
-
Install Package Manager:
-
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
-
-
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
-
-
Start Supabase Stack: Navigate to your project folder and start the Supabase stack:
supabase start
-
Update Environment Variables: Create copy of
.env.example
file and rename it to.env.local
, then copy theanon
andservice_role
keys from the supabase startup prompt and replace them into your.env.local
file. Also remove database credential lines from.env.local
file. -
Pull Latest Database Changes (Optional):
supabase db pull
-
Apply latest migration (only if there was changes from remote):
supabase migration up
-
Install packages:
npm install
-
Start the Application:
npm run dev
-
Access the Application: Navigate to http://localhost:3000 to view the application.
-
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/.
- Tomi Jumppanen
- Dat Pham
- Tuomas Heikkilä
- Anton Tugushi
Source code is licensed under the MIT License. However, the use of any Cafe AVA branding, such as logos, is prohibited.