> ## Documentation Index
> Fetch the complete documentation index at: https://skillrisedocs.pushkarverma.online/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get SkillRise up and running in under 10 minutes

Get your SkillRise e-learning platform running locally or with Docker in just a few steps.

## Prerequisites

Before you begin, ensure you have:

* **Node.js 20+** and npm installed
* **MongoDB** (local or Atlas account)
* Accounts for third-party services:
  * [Clerk](https://clerk.com) - Authentication
  * [Stripe](https://stripe.com) - Payments (or Razorpay)
  * [Cloudinary](https://cloudinary.com) - Media uploads
  * [Groq](https://console.groq.com) - AI features

<Note>
  Don't have these accounts yet? You can set them up as you go through the quickstart. Free tiers are available for all services.
</Note>

## Quick start with Docker

The fastest way to get started is with Docker Compose:

<Steps>
  <Step title="Clone the repository">
    ```bash theme={null}
    git clone https://github.com/pv-pushkarverma/SkillRise.git
    cd SkillRise
    ```
  </Step>

  <Step title="Configure environment variables">
    Create environment files for both server and client:

    ```bash theme={null}
    # Copy example files
    cp server/.env.example server/.env
    cp client/.env.example client/.env
    ```

    Edit `server/.env` and `client/.env` with your API keys. See [Configuration](/getting-started/configuration) for detailed setup instructions.
  </Step>

  <Step title="Start with Docker Compose">
    ```bash theme={null}
    docker compose up --build
    ```

    Your application will be available at:

    * **Frontend**: [http://localhost](http://localhost)
    * **Backend**: [http://localhost:3000](http://localhost:3000)
  </Step>

  <Step title="Seed the database (optional)">
    Populate with sample data:

    ```bash theme={null}
    docker compose exec server node seed.js
    ```
  </Step>
</Steps>

<Info>
  Docker Compose will automatically pull pre-built images from Docker Hub. The first run may take a few minutes.
</Info>

## Local development setup

For active development, run the services locally:

<Steps>
  <Step title="Clone and install dependencies">
    ```bash theme={null}
    git clone https://github.com/pv-pushkarverma/SkillRise.git
    cd SkillRise

    # Install server dependencies
    cd server && npm install

    # Install client dependencies
    cd ../client && npm install
    ```
  </Step>

  <Step title="Set up environment variables">
    Configure both server and client environment files:

    <Accordion title="Server environment variables (server/.env)">
      ```bash theme={null}
      MONGODB_URI=mongodb://localhost:27017/skillrise
      CURRENCY=INR

      CLERK_PUBLISHABLE_KEY=pk_test_...
      CLERK_SECRET_KEY=sk_test_...
      CLERK_WEBHOOK_SECRET=whsec_...

      CLOUDINARY_NAME=your_cloud_name
      CLOUDINARY_API_KEY=your_api_key
      CLOUDINARY_SECRET_KEY=your_api_secret

      STRIPE_PUBLISHABLE_KEY=pk_test_...
      STRIPE_SECRET_KEY=sk_test_...
      STRIPE_WEBHOOK_SECRET=whsec_...

      GROQ_CHATBOT_API_KEY=gsk_...
      GROQ_MODEL=llama-3.3-70b-versatile
      ```
    </Accordion>

    <Accordion title="Client environment variables (client/.env)">
      ```bash theme={null}
      VITE_CLERK_PUBLISHABLE_KEY=pk_test_...
      VITE_STRIPE_PUBLISHABLE_KEY=pk_test_...
      VITE_BACKEND_URL=http://localhost:3000
      ```
    </Accordion>
  </Step>

  <Step title="Start MongoDB">
    If using local MongoDB:

    <CodeGroup>
      ```bash macOS (Homebrew) theme={null}
      brew services start mongodb-community
      ```

      ```bash Linux (systemd) theme={null}
      sudo systemctl start mongod
      ```

      ```bash Windows theme={null}
      net start MongoDB
      ```
    </CodeGroup>

    Or use MongoDB Atlas and update `MONGODB_URI` with your connection string.
  </Step>

  <Step title="Start the development servers">
    Open two terminal windows:

    <Tabs>
      <Tab title="Backend">
        ```bash theme={null}
        cd server
        npm run server
        ```

        Server runs at [http://localhost:3000](http://localhost:3000)
      </Tab>

      <Tab title="Frontend">
        ```bash theme={null}
        cd client
        npm run dev
        ```

        Frontend runs at [http://localhost:5173](http://localhost:5173)
      </Tab>
    </Tabs>
  </Step>

  <Step title="Seed sample data">
    In a third terminal:

    ```bash theme={null}
    cd server
    npm run seed
    ```

    This creates sample courses, users, and community content.
  </Step>
</Steps>

## Verify your setup

After starting the application:

1. **Visit the frontend** at [http://localhost:5173](http://localhost:5173) (or [http://localhost](http://localhost) with Docker)
2. **Sign up** using Clerk authentication
3. **Browse courses** on the home page
4. **Test AI features** by opening the chat assistant

<CardGroup cols={2}>
  <Card title="Configure integrations" icon="plug" href="/integrations/clerk">
    Set up Clerk, Stripe, Cloudinary, and Groq
  </Card>

  <Card title="Deployment guide" icon="rocket" href="/deployment/docker">
    Deploy to production with Docker
  </Card>

  <Card title="Project structure" icon="folder-tree" href="/development/project-structure">
    Understand the codebase architecture
  </Card>

  <Card title="API reference" icon="code" href="/api/overview">
    Explore the REST API endpoints
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="MongoDB connection failed">
    Ensure MongoDB is running:

    ```bash theme={null}
    # Check if MongoDB is running
    mongo --eval "db.version()"
    ```

    If using Atlas, verify your connection string includes the correct password and IP whitelist.
  </Accordion>

  <Accordion title="Clerk authentication not working">
    1. Verify `CLERK_PUBLISHABLE_KEY` matches in both server and client `.env`
    2. Check that your frontend URL is added to Clerk's allowed origins
    3. Ensure webhooks are configured in Clerk dashboard
  </Accordion>

  <Accordion title="Payment webhooks failing">
    For local development, use ngrok to expose your webhook endpoint:

    ```bash theme={null}
    ngrok http 3000
    ```

    Then update your webhook URL in Stripe/Razorpay dashboard to the ngrok URL.
  </Accordion>

  <Accordion title="AI features not responding">
    1. Verify `GROQ_CHATBOT_API_KEY` is set correctly
    2. Check rate limits on your Groq account
    3. Ensure the model name is `llama-3.3-70b-versatile`
  </Accordion>
</AccordionGroup>

## Next steps

<Steps>
  <Step title="Explore features">
    Learn about [course management](/features/course-management), [AI features](/features/ai-features), and [community tools](/features/community).
  </Step>

  <Step title="Become an educator">
    Apply to create courses through the [educator application](/educators/becoming-educator) process.
  </Step>

  <Step title="Customize the platform">
    Review the [project structure](/development/project-structure) and [contributing guidelines](/development/contributing).
  </Step>
</Steps>
