Skip to content

ovistoica/designvote-api

Repository files navigation

Designvote API

The API for the Designvote Website

Tech Stack

Client: React, Typescript, Chakra-UI, Zustand, Auth0

Server (this repo): Clojure, Reitit, PostgreSQL, Auth0, DigitalOcean Spaces, Stripe

Environment Variables

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"}

Run Locally

Clone the project

  git clone [email protected]:ovistoica/designvote-api.git

Go to the project directory

  cd designvote-api

Start a repl

  lein repl

Start the server

  user=> (start)

Deployment

The project is deployed on heroku so when you push to the master branch, it will deploy automatically

API Reference

Get all items

  GET /api/items
Parameter Type Description
api_key string Required. Your API key

Upload multiple versions for a design

  POST /v1/design/${design-id}/versions/multiple
Parameter Type Description
design-id string Required. Id of design

Vote on a design survey

  POST /v1/design/vote/${design-id}/
Parameter Type Description
design-id string Required. Id of design

Body:

{

Screens

Home Screen

/

Latest Screen

/latest

The screen with the latest public designs

Popular Screen

/popular

The screen with the most popular designs

Public Design Screen

/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

Designer screen

The designer screen

/${nickname}
Parameter Type Description
nickname string Required. Nickname of the designers

Designer surveys

The designer screen

/${nickname}/surveys
Parameter Type Description
nickname string Required. Nickname of the designers

Profile

/account/profile

The edit account settings

Releases

No releases published

Packages

No packages published