Skip to content

Repository files navigation

Nusantarum Perfume Marketplace

An MVP glassmorphism marketplace for Indonesian artisan perfumes built with Next.js, Supabase, and BRIAPI sandbox BRIVA payments.

Features

  • Email/password authentication with Supabase
  • Profile system with follow/unfollow
  • Brand submissions that require admin approval
  • Product submissions with Supabase Storage image upload and curation workflow
  • Marketplace page listing approved perfumes
  • Nusantarum spotlight showcasing approved brands/products
  • Admin dashboard for approving or rejecting submissions
  • Server-only BRIVA virtual account creation through BRIAPI sandbox

Getting started

  1. Install dependencies:

    npm install
  2. Create a Supabase project and configure the following tables:

    create table profiles (
      id uuid primary key references auth.users on delete cascade,
      username text unique,
      full_name text,
      avatar_url text,
      bio text,
      is_verified_perfumer boolean default false,
      role text default 'user',
      created_at timestamp with time zone default timezone('utc'::text, now())
    );
    
    create table brands (
      id uuid primary key default gen_random_uuid(),
      owner_id uuid references profiles (id) on delete cascade,
      name text not null,
      origin text not null,
      story text not null,
      website text,
      is_approved boolean default false,
      created_at timestamp with time zone default timezone('utc'::text, now())
    );
    
    create table products (
      id uuid primary key default gen_random_uuid(),
      brand_id uuid references brands (id) on delete cascade,
      name text not null,
      price bigint not null,
      perfumer text not null,
      notes text,
      image_url text,
      is_approved boolean default false,
      created_at timestamp with time zone default timezone('utc'::text, now())
    );
    
    create table follows (
      follower_id uuid references profiles (id) on delete cascade,
      following_id uuid references profiles (id) on delete cascade,
      created_at timestamp with time zone default timezone('utc'::text, now()),
      primary key (follower_id, following_id)
    );
  3. Enable Supabase Storage bucket named product-images and make it public for product media.

  4. Copy .env.example to .env.local and fill in your values:

    cp .env.example .env.local
  5. Run the development server:

    npm run dev

Environment variables

See .env.example for the required values. Never expose server secrets to the browser; BRIAPI calls are handled by API routes only.

Admin access

Set the role column on a profile row to admin to unlock the curation dashboard.

About

ini ke delapan kalinya gw bikin hal yang sama. semoga kali ini bisa sampe publish.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages