A tiny app that makes the Art Institute of Chicago® art pieces battle against each other and ranks them using an ELO rating system.
Please have a look at the live demo here
Made possible thanks to the open API of the Art Institute of Chicago®
Clone or fork this repository and install dependencies locally.
Requires Node 18.20.3 or higher, and npm 9.1.1 or higher. To run the project locally, you'll need a running SQL database and a table with the correct models.
- Set up a database It can be remote (I used CockroachDB myself), but if you prefer to run it locally, here's a step-by-step guide on how to do it with PostgreSQL on Windows, Linux, and Mac.
- Add your connection string to the env
create the file
api/.env
and set theDATABASE_URL
variable with your database url value:DATABASE_URL=<your_connection_string>
- Create the score table
For this step, you need to run the following command:
npx prisma migrate dev
- Optional: populate your database with some data
Optionally, you can populate your database with some fake data by running this command:
npx prisma seed
With your database running and your score table created, it's now time to run the App!
Install the project dependencies by running:
yarn install
Starting the application in development
This project uses netlify and netlify functions, to start the development server, just run:
yarn start
If everything went well, you should now have an app running at http://localhost:8888