cd C:\Tugas Kuliah\Belajar\Project\literaku
npm installCreate .env.local file (sudah ada template) dan isi dengan:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key_here
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here
# NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_secret_here
# GitHub OAuth
GITHUB_ID=your_github_client_id
GITHUB_SECRET=your_github_client_secret
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000- Buka Supabase Dashboard → SQL Editor
- Copy isi file
supabase/schema.sql - Paste dan run di SQL Editor
- Akan membuat semua tables, indexes, dan policies
- Buka https://github.com/settings/developers
- New OAuth App
- Application name:
Literaku - Homepage URL:
http://localhost:3000 - Authorization callback URL:
http://localhost:3000/api/auth/callback/github - Copy Client ID dan Client Secret ke
.env.local
openssl rand -base64 32Paste hasilnya ke NEXTAUTH_SECRET di .env.local
npm run devliteraku/
├── app/
│ ├── [locale]/ # Internationalized routes
│ │ ├── layout.tsx # Root layout
│ │ └── page.tsx # Homepage
│ ├── api/
│ │ └── auth/ # NextAuth endpoints
│ └── globals.css # Global styles
├── components/
│ ├── ui/ # Reusable UI components
│ │ ├── Button.tsx
│ │ ├── Card.tsx
│ │ ├── Input.tsx
│ │ └── Modal.tsx
│ └── layout/ # Layout components
│ ├── Header.tsx
│ └── Footer.tsx
├── lib/
│ ├── fonts.ts # Google Fonts
│ ├── supabase.ts # Supabase client
│ ├── axios.ts # Axios instance
│ └── utils.ts # Utility functions
├── messages/ # i18n translations
│ ├── id.json
│ └── en.json
├── store/ # Zustand stores
│ ├── useAuthStore.ts
│ └── useReviewStore.ts
├── supabase/
│ └── schema.sql # Database schema
├── i18n.ts # next-intl config
├── middleware.ts # Locale routing
└── tailwind.config.ts # Tailwind configuration
- Primary:
brand-500(#d98943) - Accent:
accent-500(#0ea5e9) - Success:
success-500(#22c55e)
- UI: Inter (via
--font-inter) - Reading: Merriweather (via
--font-merriweather)
- Duration: 200-600ms
- Easing: ease-out, ease-in-out
- Framer Motion untuk complex animations
- Bilingual Support: ID/EN via next-intl
- Dark Mode Ready: All components support dark mode
- Responsive: Mobile-first design
- Animated: Framer Motion throughout
- Type-Safe: Full TypeScript coverage
- Optimized: Next.js 14 optimizations
npm run dev # Start dev server
npm run build # Build for production
npm start # Start production server
npm run lint # Run ESLint- ✅ Setup Supabase + GitHub OAuth
- Build additional pages (reviews, dashboard)
- Implement authentication flow
- Add create/edit review functionality
- Implement comments and likes
- Add image upload for book covers
- Make sure all env vars are set
- Run
npm installto ensure all dependencies are installed
- Verify Supabase URL and keys in
.env.local - Check if database schema is applied
- Verify callback URL matches exactly
- Check Client ID and Secret
Jika ada pertanyaan atau issue, refer ke: