Curia is a cross-repository search platform for antiquities and fine arts. The platform was contracted for by Tech Returners who retain all copyright to the code, and is made available here by permission.
The example 'production' version is published at curia.netlify.app for experimentation.
- MongoDB database, hosted on Atlas, to store user account details and exhibition data
- NestJS backend, hosted on Render, to provide a REST API to securely access the database. Protected endpoints are guarded by bearer access token
- React Native frontend, hosted on Netlify, to provide a Progressive Web App (PWA)
- Search for antiquities and fine arts across multiple sources
- Support for The Metropolitan Museum of Art and The V&A is built in
- Other sources can be easily added by creating an API object, providing a name, identification slug, fetch function, and search function
- Keep a private unified list of favourite artefacts
- Create public exhibition lists of artefacts that can be easily shared
Curia is designed as an extensible platform, and some example API integrations are included.
The Met's API provides select datasets for unrestricted commercial and noncommercial use using the Creative Commons Zero license.
The V&A's API is covered by their Terms and Conditions (in particular Section 9). Below are some important clauses to be aware of when developing this integration.
You are welcome to use the V&A's application programming interfaces (APIs) to enhance your use of Content for non-commercial personal and educational purposes. If you wish to use our APIs for commercial purposes you must contact V&A Images at: vaimages@vam.ac.uk.
The V&A is constantly updating the database. You will not cache or store any content returned by the V&A API for more than four weeks.
If you display images in your website or application you must use the image url returned by our API rather than create a copy on your local web server.
| Collections API | |
|---|---|
| Author | Victoria and Albert Museum |
| Title | Victoria and Albert Museum Collections API v2 |
| Year | 2021 |
| Version | 2 |
| URL | https://developers.vam.ac.uk |
| Collections Data | |
|---|---|
| Author | Victoria and Albert Museum |
| Title | Victoria and Albert Museum Collections Data |
| Year | 2021 |
| URL | https://collections.vam.ac.uk |
- Clone the monorepo:
git clone https://github.com/stevelw/curia.git - Install dependencies:
- Install global dependencies:
cd curia && npm i - Install back end dependencies:
cd curia-back-end && npm i - Install front end dependencies:
cd ../curia-front-end && npm i
- Install global dependencies:
- Setup a MongoDB cluster, for example on Atlas, and get a connection string
- Setup .env files:
- Back end:
- Copy the example back end .env file
curia/curia-back-end/.env-exampleand rename it to.env.test - Replace the placeholders with your MongoDB connection string and your JWT secret key (i.e. any password style string)
- Make two copies of
.env.testand rename them to.env.developmentand.env.production - Edit the connection string in each file to include a unique database name for each environment. For example,
...mongodb.net/curiaDb-test.... It's good practice to also make your JWT secret unique for each environment
- Copy the example back end .env file
- Front end:
- Make two copies of the example front end .env file
curia/curia-front-end/.env-exampleand rename them to.env.developmentand.env.production - Replace the placeholders with the host of your backend (by default this will be
http://localhost:3000for development) and the host for your front end (by default this will behttp://localhost:8081for development)
- Make two copies of the example front end .env file
- Back end:
- Run tests:
- If not already installed, install dotenvx:
npm i -g dotenvx. Alternatively, replacedotenvxwithnpx dotenvxin the package.json scripts - Run back end tests:
cd ../curia-back-end && npm t. This will run unit tests and integration tests. - Run front end tests:
cd ../curia-front-end && npm t. This will run end-to-end tests, and you will see several browser windows open and close during the tests
- If not already installed, install dotenvx:
- Run locally:
- Seed to development database:
cd ../curia-back-end && npm run seed-dev - Launch the back end:
cd ../curia-back-end && npm run start:dev - Launch the front end:
cd ../curia-front-end && npm run web. (iOS and Android native versions can also be launched, but have not been tested - Curia is primarily a PWA)
- Seed to development database:
- Build for deployment:
- Build the back end:
cd ../curia-back-end && npm run build - Build the front end:
cd ../curia-front-end && npm run build:web
- Build the back end:
User accounts can easily be created within the app by providing a unique username and a password - no email loop is required. Some sample accounts are created when seeding - for example:
Username: Steve
Password: secret123