Skip to content

Latest commit

 

History

History
230 lines (154 loc) · 4.81 KB

File metadata and controls

230 lines (154 loc) · 4.81 KB

Quick Installation Guide

The fastest way to get set up using package managers.


What You Need

  1. Python 3.8+
  2. Node.js 16+ (npm comes with it automatically)
  3. Git

macOS - Use Homebrew

1. Install Homebrew (if you don't have it)

Open Terminal and run:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2. Install Everything

# Install Python, Node.js, and Git all at once
brew install python3 node git

That's it! Homebrew installs Python, Node.js (with npm), and Git in one command.

3. Verify

python3 --version
node --version
npm --version
git --version

Windows - Use Winget

Winget comes pre-installed on Windows 10/11!

1. Open PowerShell or Command Prompt

Search for "PowerShell" in the Start menu and run as Administrator.

2. Install Everything

# Install Python
winget install Python.Python.3.12

# Install Node.js (includes npm)
winget install OpenJS.NodeJS.LTS

# Install Git
winget install Git.Git

3. Restart your terminal and verify

Close PowerShell and open a new one, then:

python --version
node --version
npm --version
git --version

Note: If python doesn't work, try python3 or py.


Download and Setup the Project

macOS:

# Go to your Downloads folder
cd Downloads

# Download the project
git clone https://github.com/Alex-cmd-dev/Help2Study.git

# Go into the project
cd Help2Study

# Run automated setup
./setup.sh

Windows:

Important - Do this first! Before running the setup script, enable PowerShell script execution. Open PowerShell as Administrator and run:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

This is a one-time setup that allows npm to work properly. After running this command, you can close the Administrator PowerShell window.

Then, in a regular PowerShell or Command Prompt window:

# Go to your Downloads folder
cd Downloads

# Download the project
git clone https://github.com/Alex-cmd-dev/Help2Study.git

# Go into the project
cd Help2Study

# Run automated setup
./setup.bat

wh

Get Your Gemini API Key

  1. Go to https://aistudio.google.com
  2. Sign in with your Google account
  3. Click on "Get API Key" in the dashboard
  4. Click "Create API Key"
  5. Create a new project (or select an existing project if you have one)
  6. Select the project you want to use for this application
  7. Click "Generate API Key"
  8. Copy the generated API key
  9. Open the .env file and paste your API key as: GEMINI_API_KEY=your_key_here

Windows tip: To quickly open the .env file in Notepad, run:

Invoke-Item ".env"

Environment Configuration (Important!)

This project uses two separate .env files:

1. Backend .env file (in the root directory)

Location: Help2Study/.env Contains: Django backend configuration

  • GEMINI_API_KEY - Your Google Gemini API key
  • SECRET_KEY - Django secret key (optional for development)
  • Other backend settings

The setup script creates this automatically from .env.example.

2. Frontend .env file (in the frontend directory)

Location: Help2Study/frontend/.env Contains: React/Vite frontend configuration

  • VITE_API_URL - The URL of your backend server

The setup script creates this automatically from frontend/.env.example.

IMPORTANT: Both files are created automatically by the setup script. If you're setting up manually or having connection issues, make sure both files exist!


Start the App

For macOS/Linux users:

make dev

This starts both servers automatically.

For Windows users:

Open two separate Command Prompt or PowerShell windows:

Window 1 - Start the Backend:

cd backend
python manage.py runserver

Window 2 - Start the Frontend:

cd frontend
npm run dev

Once both servers are running:

Open http://localhost:5173 in your browser to use the app!

To stop the servers later, press Ctrl+C in each window.


Troubleshooting

Winget not found (Windows)

Update Windows to the latest version. Winget comes with Windows 10 (version 1809+) and Windows 11.

Homebrew installation fails (macOS)

Make sure Command Line Tools are installed:

xcode-select --install

"Command not found" after installation

Close and reopen your terminal, then try again.


Why Package Managers?

  • Fast: One command installs everything
  • Easy: No clicking through installers
  • Updates: Easy to update (brew upgrade or winget upgrade)
  • Clean: Easy to uninstall (brew uninstall or winget uninstall)

That's it! See the main README.md for more details about the project.