Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/erikboesen/yaleartsvisualizer

Project for the class Software Engineering (CPSC439) at Yale University.
https://github.com/erikboesen/yaleartsvisualizer

Last synced: about 1 month ago
JSON representation

Project for the class Software Engineering (CPSC439) at Yale University.

Awesome Lists containing this project

README

        





Yale Arts Map


A graph exploration of the who and what in the Yale Arts scene.
Including, but not limited to, the YDN, Performing Arts, Yale SoA, School of Arch.

[Tech Stack](#tech-stack) •
[Development](#development) •
[Configuration](#configuration)

## Tech Stack

Yale Arts Map is a website centered around a force-directed graph representing the relationships of productions and people on campus. Its functionality is centered around this "graph", which persists and evolves naturally across navigation. Each page thus provides information and manipulates the graph around a different filterable "view" of the scraped database.

| Stack | Tooling | Dir |
| --- | --- | --- |
| **Frontend** | Next.js 14 (TypeScript, appDir) using Jotai, SWR, and d3-force | `frontend/` |
| **Backend (Client)** | Serverless Next.js API Handlers using Prisma | `frontend/src/app/api/` |
| **Backend (Scraper)** | Serverless Python AWS Lambda functions using a shared Prisma Lambda Layer | `backend/` |
| **Database** | PlanetScale MySQL and Prisma Data Proxy for pooling serverless connections | `frontend/prisma/` |
| **Infrastructure** | All backend resources codified with Terraform | `tf/` |

A preview of our interface:


image
image

## Setup

We use `pre-commit` to perform some Terraform formatting and docs generation. To
install the tools, run the following (assuming you're on Mac with homebrew):

```bash
# Install depenedencies for Terraform linting / doc gen
$ brew install pre-commit terraform-docs tflint tfsec checkov terrascan infracost tfupdate minamijoyo/hcledit/hcledit jq
# Configure Terraform docs templating
$ DIR=~/.git-template
$ git config --global init.templateDir ${DIR}
$ pre-commit init-templatedir -t pre-commit ${DIR}
# Install + run pre-commit on all files
$ pre-commit install
$ pre-commit run --all-files
```

Most of use use VSCode for development. A recommended list of extensions can be found in `.vscode/extensions.json`.

## Development

### Frontend

To develop locally...

```bash
# Enter the frontend
$ cd YaleArtsVisualizer/frontend/
# Install dependencies and begin the local web server
$ yarn
$ yarn dev
```

> **Note**
> You will need to fill out a `.env.local` file in the `frontend/` directory as described in the [Configuration](#configuration) section to be able to connect to the development backend from your local environment. However, if you are deploying your own `sandbox` environment, the correct `.env.local` file will be auto-generated for you upon applying your Terraform plan.

## Configuration

The client app expects the following environment variables to be set in order
to communicate with the backend. Their corresponding locations from the Terraform
setup have been provided, but you should replace these after being given a valid
development .env file by a member of the team.

```ini
# frontend/.env.local
DATABASE_URL=
```