Skip to content

Repository files navigation

CARPI Logo

CARPI Course Planner - Frontend

Visit the website! License: MIT Join our Discord server!

Built for RPI Students

The CARPI Course Planner allows you to plan future semesters with ease. Complete with a course catalog for quickly finding historical and current courses, a toolbox for holding your desired courses, and a planner to organize courses into your long-term plan.

Features

  • Responsive desktop + mobile experience
  • Explore the RPI course catalog with search and filters
  • Filter courses by subject, attributes, and semester availability
  • Drag and drop courses into semester blocks
  • Add, edit, and remove semester blocks
  • Manage credit selection per course
  • Persistent planner data in browser local storage
  • Import and export planner data as JSON

Getting Started

These instructions will help you get a copy of the project's frontend up and running on your local machine for development and testing.

Prerequisites

To run this project, you need Node.js and npm installed on your machine. We currently pin tool versions in the package.json engines field:

  • Node.js: ~24.14.0
  • npm: ~11.12.0

We highly recommend using Node Version Manager (nvm) to easily switch between Node versions. Verify your environment with:

node -v
npm -v

If you plan to use Docker, ensure you have Docker Desktop installed.

Local Installation

  1. Clone the repository and navigate into the project directory:
git clone https://github.com/Project-CARPI/site.git
cd site
  1. Use the correct Node version. If you have nvm installed, simply run the following command to read the .nvmrc file and use Node v24.14:
nvm use
  1. Install the dependencies and start the development server:
npm install
npm run dev

By default, Vite serves the app on localhost (usually http://localhost:5173).

Docker Installation

If you prefer an isolated containerized environment, you can use our Docker Compose setup.

  1. Clone the repository and navigate into the project directory:
git clone https://github.com/Project-CARPI/site.git
cd site
  1. Build the image and spin up the container:
docker compose up --build

To run the container in detached mode (in the background), append the -d flag:

docker compose up -d

The app will now be accessible at http://localhost:5173 (or the port specified in your docker compose configuration).

To stop the container, run:

docker compose down

Available Scripts

  • npm run dev: Start the Vite development server.
  • npm run build: Type-check and create a production build.
  • npm run preview: Preview the production build locally.
  • npm run lint: Run ESLint to check for code issues.
  • npm run prettier:check: Check code formatting.
  • npm run prettier:write: Auto-format files with Prettier.

Backend Integration

The frontend uses Axios, which is configured in src/lib/axios.ts with the following base URL:

  • http://carpi.cs.rpi.edu:8000/api/v1/

If you are running a local backend (source code located here), update the Axios baseURL in src/lib/axios.ts to point to your local server.

Project Structure

src/
  components/          # Shared UI components
  core/workspace/      # Planner workspace context, reducers, and persistence utils
  features/
    catalog/           # Catalog search, filters, and result rendering
    dnd/               # Drag-and-drop wiring
    planner/           # Planner UI and semester/course interactions
    toolbox/           # Global toolbox controls
  lib/                 # Shared helpers, API client, types, hooks, stores
  pages/               # Route-level pages (Home, Catalog, Planner)

Build and Deployment

When you are ready to deploy the site to production, run the build command. This compiles the TypeScript files and bundles the project using Vite:

npm run build

The optimized, production-ready files are generated in the dist/ folder. You can locally preview the production build by running:

npm run preview

Built With

Contributing

Please reach out to one of the current developers for information on how to get started with contributing to the project.

Authors

Contributors list

License

This project is licensed under the MIT License. See LICENSE for details.

About

The CARPI Course Planner website.

Resources

Stars

Watchers

Forks

Packages

Contributors

Languages