Developer Installation Guide
This guide covers setting up AniDojo locally for development, testing, and contributions.Prerequisites
Before you begin, ensure you have the following installed:Node.js 18+
Required for running Next.js and development tools.Download from nodejs.org
Package Manager
Choose one:
- npm (comes with Node.js)
- yarn
- pnpm
- bun
Git
For cloning the repository and version control.
Supabase Account
Free account at supabase.com for backend services.
Installation Steps
Clone the Repository
Clone the AniDojo repository to your local machine:
Replace
yourusername with the actual repository owner or organization name.Install Dependencies
Install all required npm packages:Key Dependencies Installed:
| Package | Version | Purpose |
|---|---|---|
| next | ^16.0.0 | React framework with App Router |
| react | 19.1.0 | UI library with Server Components |
| @supabase/supabase-js | ^2.78.0 | Supabase client |
| @supabase/ssr | ^0.7.0 | Server-side rendering support |
| axios | ^1.12.2 | HTTP client for Jikan API |
| tailwindcss | ^4 | Utility-first CSS framework |
| typescript | ^5 | Type safety |
| lucide-react | ^0.544.0 | Icon library |
| zustand | ^5.0.8 | State management |
| react-hook-form | ^7.63.0 | Form handling |
| zod | ^4.1.11 | Schema validation |
| recharts | ^3.2.1 | Statistics charts |
Installation may take 2-5 minutes depending on your internet connection and package manager.
Set Up Supabase Project
Create a Supabase Project
- Go to supabase.com and sign in
- Click “New Project”
- Enter project details:
- Name: anidojo-dev
- Database Password: Generate a strong password (save it!)
- Region: Choose closest to you
- Click “Create New Project”
- Wait 2-3 minutes for project initialization
Get API Credentials
- In your Supabase dashboard, go to Settings → API
- Copy the following values:
- Project URL:
https://[project-ref].supabase.co - anon/public key: Long JWT token starting with
eyJ...
- Project URL:
Configure Environment Variables
Create a Environment Variable Reference:
.env.local file in the project root:| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL | Yes | Your Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Yes | Supabase anonymous/public key |
Variables prefixed with
NEXT_PUBLIC_ are exposed to the browser. Never put secrets here!Set Up Database Schema
AniDojo uses PostgreSQL through Supabase. You need to run the database migrations.
Option A: Using Supabase Dashboard (Recommended for Beginners)
- Open your Supabase project dashboard
- Navigate to SQL Editor (left sidebar)
- Click “New Query”
- Open the migration file:
supabase/migrations/001_initial_schema.sql - Copy the entire SQL script
- Paste into the SQL Editor
- Click “Run” (or press Cmd/Ctrl + Enter)
- Wait for success message
- Verify tables in Table Editor
profiles- User profilesanime_entries- User anime listsreviews- Anime reviewsreview_votes- Helpful/unhelpful votescomments- Review commentscomment_votes- Comment upvotes/downvotescustom_lists- Custom anime listscustom_list_entries- List entries
Option B: Using Supabase CLI (Recommended for Production)
The migration includes database triggers for automatic profile creation and updated_at timestamps.
Set Up Storage Buckets
Create storage buckets for file uploads:
Create Buckets in Supabase Dashboard
- Go to Storage in Supabase dashboard
- Click “New Bucket”
- Name:
avatars - Public: ✅ Yes
- File size limit: 5 MB
- Allowed MIME types:
image/jpeg, image/png, image/webp, image/gif
- Name:
anime-images - Public: ✅ Yes
- File size limit: 10 MB
- Allowed MIME types:
image/jpeg, image/png, image/webp
- Name:
review-images - Public: ✅ Yes
- File size limit: 10 MB
- Allowed MIME types:
image/jpeg, image/png, image/webp
Set Up Storage Policies
Run these SQL commands in the SQL Editor:Row Level Security ensures users can only manage their own avatar files.
Start Development Server
Run the development server with Turbopack:The server will start on
http://localhost:3000Expected Output:Turbopack provides faster hot module replacement (HMR) compared to Webpack.
Verify Installation
Test that everything is working:
- Open Browser: Navigate to
http://localhost:3000 - Landing Page: You should see the auth landing page with anime data
- Sign Up: Create a test account
- Email:
[email protected] - Password:
testpassword123
- Email:
- Check Supabase:
- Go to Supabase dashboard → Authentication → Users
- Verify your test user appears
- Go to Table Editor → profiles
- Verify profile was auto-created
- Test Features:
- Browse anime on the dashboard
- Add an anime to your list
- Write a review
- Check that data appears in Supabase tables
Project Structure
Understand the codebase organization:Development Workflow
Running Build
Environment-Specific Commands
| Command | Description |
|---|---|
npm run dev | Start dev server with Turbopack (hot reload) |
npm run build | Build production bundle |
npm run start | Start production server (run build first) |
npm run lint | Run ESLint for code quality |
Working with Supabase
Common Development Tasks
Add a new database table
Add a new database table
- Create a new migration file:
supabase/migrations/002_new_feature.sql - Write SQL for new table with RLS policies
- Run migration:
supabase db push - Generate new TypeScript types:
supabase gen types typescript - Update queries in
src/lib/supabase/queries.ts
Add a new page route
Add a new page route
- Create file in
src/app/your-route/page.tsx - Export default component
- Add to navigation in sidebar component
- Update TypeScript types if needed
Test API rate limiting
Test API rate limiting
The Jikan API has rate limits (3 requests/second). Test the rate limiter:
Debug authentication issues
Debug authentication issues
- Check
.env.localhas correct Supabase credentials - Verify cookies are enabled in browser
- Check Supabase dashboard → Authentication → Users
- Check browser DevTools → Network tab for failed requests
- Check RLS policies in Supabase SQL Editor:
Troubleshooting
Testing
Manual Testing Checklist
- Sign up new user
- Sign in existing user
- Search for anime
- Add anime to list with all status types
- Edit anime entry (status, episodes, rating)
- Delete anime entry
- Write review (all rating dimensions)
- Save review as draft
- Publish review
- Vote on review (helpful/unhelpful)
- Add comment to review
- Create custom list
- Add anime to custom list
- Make custom list public
- View another user’s profile
- Upload avatar
- Update profile bio
- View statistics on My Lists page
- Test responsive design (mobile, tablet, desktop)
Contributing
Want to contribute? Check the GitHub issues for open tasks or submit a pull request with new features!
Contribution Guidelines
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Make changes with clear commit messages
- Test thoroughly using the checklist above
- Run linter:
npm run lint - Submit pull request with description of changes
Code Style
- Use TypeScript for type safety
- Follow ESLint rules (
npm run lint) - Use Tailwind CSS utility classes
- Write clear component and function names
- Add comments for complex logic
- Keep components small and focused
Deployment
AniDojo can be deployed to various platforms:Vercel
Recommended for Next.js apps
- Connect GitHub repo
- Add environment variables
- Deploy automatically on push
Netlify
Alternative with similar featuresBuild command:
npm run build
Publish directory: .nextDocker
For self-hostingCreate
Dockerfile with Node.js base imageRailway
Easy deployment with databaseConnects to GitHub and auto-deploys
Environment Variables for Production
Ensure these are set in your deployment platform:NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY
Additional Resources
- Next.js 15 Documentation
- Supabase Documentation
- Jikan API Documentation
- Tailwind CSS Documentation
- React 19 Documentation
Need Help?
If you encounter issues during installation:- Check this documentation thoroughly
- Search existing GitHub issues
- Open a new GitHub issue with:
- Error message
- Steps to reproduce
- Your environment (OS, Node version, etc.)
- Screenshots if applicable