Skip to content

Automate EduAid Installation with setup.sh #219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kartik-212004
Copy link
Contributor

@kartik-212004 kartik-212004 commented Feb 15, 2025

Automate EduAid Installation with setup.sh

closes #218

Summary

This PR introduces a new setup.sh script in the root directory, enabling one-command installation for EduAid. The script automates dependency installation, environment setup, and service initialization, reducing manual setup steps.

  • 🚀 Feature – Adds a new setup.sh script for automated installation.
  • 🐞 Bug Fix – Fixes an existing issue.
  • 🔧 Refactor – Improves code without changing functionality.
  • 📝 Documentation – Updates documentation.

Cross- Platform setup script

Changes Implemented

  • Added a new setup.sh script to handle full project setup.
  • The script:
    • Checks and installs required dependencies (Node.js, Python, npm, curl, tar, etc.).
    • Creates and activates a virtual environment for the backend.
    • Installs backend dependencies using pip install -r requirements.txt.
    • Downloads and extracts the Sense2Vec model if not already present.
    • **Navigate to the Eduaid_web folder, copy .env.example to .env, and duplicate its content.
    • Installs frontend dependencies for the web app and extension (npm install).

EduAid Setup Guide

This guide provides instructions on how to set up EduAid after pulling the branch.

Prerequisites

  • Ensure you have Git installed.
  • Crucially: Use Git Bash to execute the setup script. Other shells might encounter issues. (For Windows)

Installation

  1. Clone the Repository: If you haven't already, clone the EduAid repository to your local machine:
  2. then give execute permissions
chmod +x setup.sh
./setup.sh
  • Go to the root folder and run the script by ./setup.sh
  • It will automatically start installing Python as well as eduaid_web and extension dependencies
  • After finishing the installing and everything , go the the service_account_key.json and overwrite it with your secret
  • Activate the venv by going to the root folder and then run the python file
  • Also run the eduaid_web or the extension to run the frontend

@kartik-212004 kartik-212004 changed the title feat: make setup script platform-independent Automate EduAid Installation with setup.sh Feb 15, 2025
@Aditya062003
Copy link
Contributor

Hey, we already have a script.sh for automating backend startup, so I don't think we'll need this.

@kartik-212004
Copy link
Contributor Author

kartik-212004 commented Feb 27, 2025

Hey, we already have a script.sh for automating backend startup, so I don't think we'll need this.

Yes, but that script is specifically for setting up the other repo we clone and for the backend. This script, on the other hand, will handle the complete project setup from scratch—installing dependencies for both the backend and frontend, creating the .env file, and running the project. It's essentially a setup.sh script.

@Roaster05
Copy link
Contributor

@Aditya062003 what are your thoughts on this should we keep this as one of the installation method for those who couldnt use docker setup? or maybe we can skip this, i am not sure about this, @kartik-212004 i was actually thinking to have a docker setup instead of a shell script which will setup this but do you have any usecases where this can be preferred?

@kartik-212004
Copy link
Contributor Author

kartik-212004 commented Mar 11, 2025

@Roaster05 u are right but ,the shell script is essential because we need to clone the s2v-old repo before setting up the project. Without it, users would have to manually clone and configure everything, which can be error-prone. While Docker is a great option, but we cannot use docker to clone the app until and unless we push it into docker hub, the script provides flexibility for those who can't use Docker or prefer a native setup. Keeping it as an alternative could be useful. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A Script file to completely automate the project setup process
3 participants