A decentralized marketplace built on Sui blockchain for peer-to-peer trading of thrift items with AI-powered personalization.
ThriftChain/
├── frontend/ # Next.js frontend application
│ ├── src/ # Source code
│ ├── public/ # Static assets
│ └── package.json # Frontend dependencies
├── contracts/ # Sui Move smart contracts (to be added)
├── tasks/ # Development task lists
├── docs/ # Documentation
└── package.json # Root workspace configuration
- Node.js 18+
- npm or yarn
- Clone the repository
- Install frontend dependencies:
npm run install:frontend
# or
cd frontend && npm installRun the development server from the root:
npm run dev
# or navigate to frontend directory
cd frontend && npm run devOpen http://localhost:3000 with your browser to see the result.
From the root directory:
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
From the frontend/ directory:
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
- Suiet Wallet Kit: Connect with Sui wallet extensions
- zkLogin (Enoki): Passwordless authentication via Google OAuth
- Routes:
GET /api/zklogin/enoki/start- Initiate OAuth flowPOST /api/zklogin/enoki/complete- Complete authenticationGET /auth/callback- OAuth callback handler
Create a .env.local file in the frontend/ directory:
# Enoki (managed zkLogin)
ENOKI_API_KEY=your_enoki_api_key
ENOKI_OAUTH_CLIENT_ID=your_google_oauth_client_id
NEXT_PUBLIC_ZKLOGIN_REDIRECT_URL=http://localhost:3000/auth/callback
# Supabase (to be added)
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Sui Network
NEXT_PUBLIC_SUI_NETWORK=testnet
NEXT_PUBLIC_RPC_URL=https://fullnode.testnet.sui.io:443- Frontend: Next.js 16, React 19, TypeScript
- Styling: Tailwind CSS, shadcn/ui
- Blockchain: Sui Network, @mysten/sui SDK
- Wallet: Suiet Wallet Kit, Enoki zkLogin
- Storage: Walrus
- Database: Supabase
The frontend can be deployed to Vercel. See Next.js deployment docs.