This should be a living document! If you encounter problems or missing instructions, please add them to this document in a PR.
This repository holds the code written by the team Thee AIdvisors (Noah Lanctot, Lois Lanctot, Dhiyaa Nazim, Mason Sain, Abdul Rauoof) for Green River College's course SDEV 485 and 486 (Software Development Capstone 1 and 2) for Winter and Spring 2025.
Tech stack:
- Node.js: Backend (JS)
- Express.js: API routes
- nodemon: Auto restart node app
- dotenv: Load environment variables
- cors: Provides middleware
- node-nlp: Provides translation from user text to responses
- Axios: Handles HTTP requests between the frontend and backend
- OpenAI: Language model
- Cheerio: Parses and extracts content from HTML pages
- pdf-parse: Extracts text content from PDF files
- DataStax (Astra DB): Vector + document DB.
- fs (File System) Reads and writes local files
- p-limit Controls concurrency
- express-rate-limit Limits how frequently users can make requests
- bcrypt Hashes passwords
- jsonwebtoken Generates and verifies authentication tokens
- node-cron Schedules automated scraping tasks
- langchain/text_splitter Splits large chunks of scraped text into manageable segments
- React.js: Frontend (UI components, JS, HTML, CSS)
- Vite: frontend build tool
- Clone the project repository locally.
git clone https://github.com/dhysdrn/nursing-chatbot.git - Have the package manager
npminstalled (npm). - Create a .env file in the frontend with this variable: {VITE_FETCH_URL="http://localhost:5002/ask"}.
- Create a .env file in the frontend with this variable using the OpenAI API key you generate: {AI_API_KEY=""}.
- In the terminal/command line, navigate to the backend folder and install all backend dependencies with
npm install. - Within the same backend folder, run the project with
node server.js. - In the terminal/command line, navigate to the frontend folder and install all frontend dependencies with
npm install. - Within the same frontend folder, run the project with
npm run dev. - Once both the backend and frontend are running, you can access the full application by visiting the frontend URL
- Pull the Latest Changes
Before starting any work, ensure your local repository is up to date with the latest changes:
git checkout main # Switch to the main branch
git pull origin main # Pull the latest changes- Create a New Branch
Create a new branch for your changes (choose a descriptive name):
git checkout -b your-branch-name- Install Dependencies
If you haven't already installed the dependencies, do so now:
npm install- Make Your Changes
Make the necessary changes in the codebase. - Commit Your Changes
Commit your changes with a clear, descriptive message:
git commit -m "Describe your changes here"- Push Your Changes
Push your changes to the repository:
git push origin your-branch-name- Submit a Pull Request
- Go to the original repository on GitHub.
- Click on Pull Requests and then New Pull Request.
- Select your branch and submit the request.
- Add a description of your changes and request a review from a team member.
- Ensure your code follows project standards and is well-documented.
- Test your changes before submitting a pull request.
- Practice submitting pull requests and avoid committing directly to the main branch to prevent conflicts.
thee-aidvisors/
│-- backend/ # Node.js backend
│-- frontend/ # React Vite frontend
│-- README.md # Project documentation