Skip to content

Installation

Mohit ahlawat edited this page Oct 12, 2025 · 1 revision

🚀 Installation Guide

This guide will walk you through setting up AniNotion on your local machine for development.

Prerequisites

  • Node.js: Version 18 or higher.
  • MongoDB: Version 4.4 or higher.
  • npm or yarn.

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/mohitahlawat2001/AniNotion.git
    cd AniNotion
  2. Install dependencies: This will install dependencies for the root, frontend, and backend packages.

    npm install
  3. Set up environment variables: Copy the example environment files for both the frontend and backend.

    # Backend environment
    cp aninotion-backend/.env.example aninotion-backend/.env
    
    # Frontend environment
    cp aninotion-frontend/.env.example aninotion-frontend/.env
  4. Configure your environment: Edit aninotion-backend/.env with your local configuration and API keys.

    MONGODB_URI=mongodb://localhost:27017/aninotion
    JWT_SECRET=your-super-secret-jwt-key
    GOOGLE_CLIENT_ID=your-google-client-id
    GOOGLE_CLIENT_SECRET=your-google-client-secret
    CLOUDINARY_CLOUD_NAME=your-cloudinary-name
    CLOUDINARY_API_KEY=your-cloudinary-key
    CLOUDINARY_API_SECRET=your-cloudinary-secret
  5. Initialize the database: Run the seed script to populate the database with initial data.

    npm run seed
    npm run migrate:v0.5
  6. Start the development servers: This command starts both the frontend and backend servers concurrently.

    npm run dev
    • Frontend will be available at http://localhost:5173.
    • Backend will be available at http://localhost:5000.

Available Scripts

Root Level

  • npm run dev: Start both frontend and backend in development mode.
  • npm run server: Start only the backend server.
  • npm run client: Start only the frontend client.
  • npm run seed: Seed the database with initial data.

Backend (aninotion-backend)

  • npm run start: Start the backend server.
  • npm run migrate: Run database migrations.
  • npm run backup: Create a database backup.

Frontend (aninotion-frontend)

  • npm run build: Build the frontend for production.
  • npm run preview: Preview the production build locally.

Clone this wiki locally