From f7af9ac7aed6ee354f30354ac13689f793fdeee8 Mon Sep 17 00:00:00 2001 From: "Eng. Elias" Date: Sun, 24 Mar 2024 20:04:24 +0400 Subject: [PATCH] adding .bat and .sh files to setup and start project easily --- README.md | 9 +++++++++ requirements.txt | 11 +++++++---- setup_linux_mac.sh | 26 ++++++++++++++++++++++++++ setup_win.bat | 25 +++++++++++++++++++++++++ start_linux_mac.sh | 9 +++++++++ start_win.bat | 10 ++++++++++ 6 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 setup_linux_mac.sh create mode 100644 setup_win.bat create mode 100644 start_linux_mac.sh create mode 100644 start_win.bat diff --git a/README.md b/README.md index 391faa8..8aa5138 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,14 @@ This application provides a simplified user interface for leveraging the power o To get started with the CrewAI Simplified App, install [PostgreSQL](https://www.postgresql.org/download/), setup PostgreSQL user and password and follow these simple steps: +For non-developers: + +1. **Setup the project**: clone or download the project then run `setup_win.bat` for Windows users or `setup_linux_mac.sh` for Linux or MacOS users. + +2. **Start the project**: run `start_win.bat` for Windows users or `start_linux_mac.sh` for Linux or MacOS users. ✔Finish! + +For developers: + 1. **Installation**: Clone the repository and install dependencies using npm or yarn: ```bash @@ -128,6 +136,7 @@ This app is built using TypeScript, Prisma, GraphQL, Next.js, and node-calls-pyt - Improvement: - Update python and npm packages. - Some UI enhancements. + - Add .bat and .sh files to setup and start the project easily for normal users. - Enhance README.md. ## To Do diff --git a/requirements.txt b/requirements.txt index d707806..3137263 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,7 @@ alembic==1.13.1 annotated-types==0.6.0 anyio==4.3.0 appdirs==1.4.4 +arxiv==2.1.0 asgiref==3.7.2 attrs==23.2.0 backoff==2.2.1 @@ -34,6 +35,7 @@ docstring-parser==0.15 duckduckgo_search==4.4.3 embedchain==0.1.97 fastapi==0.110.0 +feedparser==6.0.10 filelock==3.13.1 flatbuffers==24.3.7 frozendict==2.4.0 @@ -50,7 +52,7 @@ google-cloud-core==2.4.1 google-cloud-resource-manager==1.12.3 google-cloud-storage==2.15.0 google-crc32c==1.5.0 -google-generativeai==0.3.2 +google-generativeai==0.4.1 google-resumable-media==2.7.0 googleapis-common-protos==1.62.0 gptcache==0.1.43 @@ -77,11 +79,11 @@ lancedb==0.5.7 langchain==0.1.13 langchain-community==0.0.29 langchain-core==0.1.33 -langchain-experimental==0.0.52 -langchain-google-genai==0.0.9 +langchain-experimental==0.0.55 +langchain-google-genai==0.0.11 langchain-openai==0.0.5 langchain-text-splitters==0.0.1 -langsmith==0.1.27 +langsmith==0.1.31 lxml==5.1.0 Mako==1.3.2 markdown-it-py==3.0.0 @@ -161,6 +163,7 @@ schema==0.7.5 selenium==4.18.1 semanticscholar==0.7.0 semver==3.0.2 +sgmllib3k==1.0.0 shapely==2.0.3 six==1.16.0 smmap==5.0.1 diff --git a/setup_linux_mac.sh b/setup_linux_mac.sh new file mode 100644 index 0000000..7085c11 --- /dev/null +++ b/setup_linux_mac.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Install npm packages +echo "Installing npm packages..." +npm i + +# Create Python virtual environment +echo "Creating Python virtual environment..." +python3 -m venv venv + +# Install Python packages using pip +echo "Installing Python dependencies..." +./venv/bin/python ./venv/bin/pip install -r requirements.txt + +# Prisma Migrations +echo "Applying Prisma Migrations..." +npx prisma generate +npx prisma migrate deploy + +# Building the project +echo "Building the project..." +npm run build + +# Building is finished +echo "Building is finished" +pause \ No newline at end of file diff --git a/setup_win.bat b/setup_win.bat new file mode 100644 index 0000000..afe730b --- /dev/null +++ b/setup_win.bat @@ -0,0 +1,25 @@ +@echo off + +REM Install npm packages +echo Installing npm packages... +call npm i + +echo Creating Python virtual environment... +call python -m venv venv + +REM Install Python packages using pip +echo Installing Python dependencies... +call "./venv/scripts/python.exe" "./venv/scripts/pip.exe" install -r requirements.txt + +REM Prisma Migrations +echo Applying Prisma Migrations... +call npx prisma generate +call npx prisma migrate deploy + +REM Building the project +echo Building the project +call npm run build + +REM Building is finished +echo Building is finished +pause diff --git a/start_linux_mac.sh b/start_linux_mac.sh new file mode 100644 index 0000000..3babe0d --- /dev/null +++ b/start_linux_mac.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Open browser +echo "Opening browser..." +open http://localhost:3000 + +# Run the project +echo "Starting development server..." +npm start diff --git a/start_win.bat b/start_win.bat new file mode 100644 index 0000000..d54343d --- /dev/null +++ b/start_win.bat @@ -0,0 +1,10 @@ +REM Run the project +echo Starting development server... +start call npm start + +REM Wait for a few seconds to ensure the server is up and running +timeout /t 2 + +REM Open browser +echo Opening browser... +start http://localhost:3000