Prerequisites
Before you begin, ensure you have the following installed:Node.js
Version 18.x or higherAniDev is tested on Node.js v24.13.1. Download from nodejs.org
Package Manager
pnpm (recommended)Install pnpm:
npm install -g pnpmAlso compatible with npm and yarnSupabase Account
Free account requiredSign up at supabase.com for database and authentication
Redis (Optional)
For cachingRedis is optional but recommended for optimal performance
AniDev uses Astro v5.16.8 with server-side rendering. Make sure your environment supports SSR.
Installation Steps
Install Dependencies
Install all required dependencies using your preferred package manager:This will install all dependencies including:
- Astro 5.16.8 - Web framework
- React 19.2.3 - UI library
- TailwindCSS 4.1.10 - Styling
- Supabase 2.90.1 - Backend and authentication
- Vidstack - Video player
- Zustand - State management
- And many more (see
package.jsonfor full list)
Configure Environment Variables
Create a
.env file in the root directory with the following variables:.env
Getting Supabase Credentials
- Create a new project at supabase.com
- Go to Project Settings → API
- Copy your project URL and keys:
- URL:
https://your-project.supabase.co - anon/public key: Used for client-side operations
- service_role key: Used for admin operations (keep secret!)
- URL:
Generating AUTH_SECRET
Generate a secure random string:Optional Services:
- Redis: Improves API performance with caching. Run locally with Docker or use a cloud provider.
- Pinata: Used for decentralized image storage via IPFS.
- Sentry: Error tracking and monitoring for production.
Set Up the Database
AniDev uses Supabase for data storage. You’ll need to set up your database schema:
- Run migrations (if provided) or manually create tables in Supabase
- Configure Row Level Security (RLS) policies for authentication
- Set up necessary database functions and RPC endpoints
Start the Development Server
Start the local development server:The application will start on http://localhost:4321
The dev server uses Astro’s development mode with hot module replacement (HMR) for fast iteration.
Available Scripts
AniDev includes several npm scripts for development and production:| Script | Command | Description |
|---|---|---|
| Development | pnpm dev | Start development server on port 4321 |
| Build | pnpm build | Type check with Astro and build for production |
| Preview | pnpm preview | Preview production build locally |
| Start | pnpm start | Start production server (after build) |
| Test | pnpm test | Run Vitest test suite |
| Format | pnpm format | Format code with Biome and Prettier |
| Release | pnpm release | Create a new version with standard-version |
Project Structure
Understanding the codebase structure:Development Tips
Hot Reload
The dev server automatically reloads when you save changes. No need to manually refresh!
Type Safety
Run
pnpm astro check to verify TypeScript types before building.Code Quality
Use
pnpm format to auto-format code with Biome and Prettier before committing.Testing
Write tests in
/src/test/ using Vitest. Run with pnpm test.Common Issues
Building for Production
Run Type Check and Build
- Runs
astro checkto verify TypeScript types - Builds the project for production with optimizations
- Outputs to
./dist/directory
Deploy
AniDev is configured for deployment on Vercel with Node.js adapter:
- Output mode:
server(SSR enabled) - Adapter:
@astrojs/nodein standalone mode - Site URL:
https://anidev.app
Make sure to set all environment variables in your deployment platform’s settings.
Redis Setup (Optional)
For optimal performance with caching:.env:
Next Steps
Architecture
Learn about AniDev’s domain-driven architecture and design patterns
API Documentation
Explore available API endpoints and integration options
Contributing
Check the contribution guidelines to start contributing to AniDev
Testing Guide
Learn how to write and run tests for components and APIs
Need Help?
If you encounter issues during installation:- Check the GitHub Issues
- Review the README.md for additional context
- Join the community discussions
