Serverless APIs for www.analogstudios.net (and friends) using arc.codes.
Assumes valid AWS credentials are either exported as environment variables or you have a relevant configuration setup in ~/aws/credentials.
Additionally, the following credentials files are required to run this project for the various services and APIs exposed.
For running the various APIs using the Architect sandbox.
Name | Service | Role |
---|---|---|
AWS_ACCESS_KEY_ID |
AWS | Publish API |
AWS_SECRET_ACCESS_KEY |
AWS | Publish API |
AWS_CLOUDFRONT_ID |
AWS | Publish API |
CONTENTFUL_ACCESS_TOKEN |
Contentful | Events API |
CONTENTFUL_SPACE |
Contentful | Events API |
CONTENTFUL_WEBHOOK_ACCESS_TOKEN |
Contentful | Publish API |
DATABASE_URL |
Turso | All APIs except Events |
DATABASE_TOKEN |
Turso |
For running Prisma Studio.
Name | Service | Role |
---|---|---|
DATABASE_URL |
Local SQLite | All APIs except Events |
- Clone the repo
- Run
npm ci
- Run
npm run arc env
- Run
npm start
to use the local Architect sandbox for development - Make a copy of .env.local and rename it to .env
To use Prisma Studio, run npm run studio
Data sourced from Turso for the Album resource type. Available at /albums
internally and publicly as /api/v2/albums
.
Options:
?id=xxx
- Filter by theid
of the album?artistId=xxx
- Filter by theid
of an artist
You can only pass one or the other
Data sourced from Turso for the Artist resource type. Available at /artists
internally and publicly as /api/v2/artists
.
Options:
?id=xxx
- Filter by theid
of the artist
Structured events content sourced from Contentful for the Event resource type. Available at /events
internally and publicly as /api/v2/events
.
Options:
?id=xxx
- Filter by theid
of the event?tag=xxx
- Filter by tags of the event
You can only pass one or the other
Data sourced from Turso for the Post resource type. Available at /posts
internally and publicly as /api/v2/posts
.
Options:
?id=xxx
- Filter by theid
of a post