The API for the Designvote Website
Client: React, Typescript, Chakra-UI, Zustand, Auth0
Server (this repo): Clojure, Reitit, PostgreSQL, Auth0, DigitalOcean Spaces, Stripe
To run this project, you will need to add the following environment variables to your resources/secrets.edn
file
# resources/secrets.edn
{:stripe-secret "example"
:signing-secret "example"
:yearly-plan "example"
:monthly-plan "example"
:aws-access-key "example"
:aws-secret-key "example"
:aws-s3-bucket-name "example"
:aws-s3-endpoint "example"}
Clone the project
git clone git@github.com:ovistoica/designvote-api.git
Go to the project directory
cd designvote-api
Start a repl
lein repl
Start the server
user=> (start)
The project is deployed on heroku so when you push to the master branch, it will deploy automatically
GET /api/items
Parameter | Type | Description |
---|---|---|
api_key |
string |
Required. Your API key |
POST /v1/design/${design-id}/versions/multiple
Parameter | Type | Description |
---|---|---|
design-id |
string |
Required. Id of design |
POST /v1/design/vote/${design-id}/
Parameter | Type | Description |
---|---|---|
design-id |
string |
Required. Id of design |
Body:
{
/
/latest
The screen with the latest public designs
/popular
The screen with the most popular designs
/design/{designId}
Parameter | Type | Description |
---|---|---|
designId |
string |
Required. Id of design |
The screen where users can vote on designs. If a user doesn't vote, he will not see results |
The designer screen
/${nickname}
Parameter | Type | Description |
---|---|---|
nickname |
string |
Required. Nickname of the designers |
The designer screen
/${nickname}/surveys
Parameter | Type | Description |
---|---|---|
nickname |
string |
Required. Nickname of the designers |
/account/profile
The edit account settings