SolsticeAR is an open source AR media sharing platform. Please learn more at www.solsticear.com
This repo is hosting the source code for the Node.js/GraphQL/PostgreSQL backend. For access to the landing page, the React/Redux web dashboard or the the React Native mobile app please visit https://github.com/SolsticeAR.
- Apollo Server / GraphQL
- PostgreSQL
- Sequelize
First make sure you have the following installed on your machine:
- Node.js
- PostgreSQL
And then open up PostgreSQL and create a database called solstice
In terminal:
psql
create database solstice;
OBS: Please make sure postgres is running.
- First, install all package dependencies. In the terminal type:
yarn
Run all migrations:
yarn migrate
To undo migrations you can run yarn migrate:undo
And then seed the DB:
yarn seed
To undo seeds you can run yarn seed:undo
Run the server:
yarn start
Open browser at: http://localhost:4000
to checkout the API's docs.
For more info on how to use the API, please consult GraphQL's docs
- Send GraphQL query to localhost:4000/
- Customize the query so that you only get the data you need
- getAdmin(email: String!): Admin
{
getAdmin(email: String) {
id
name
email
industry
}
}
- register(adminData: NewAdmin): Admin
mutation {
register(adminData:{
name: String!
email: String!
password: String!
industry: String
}) {
name
email
industry
}
}
- login(email: String, password: String): LoginResponse
mutation {
login(email:String, password: String) {
token
admin {
name
email
industry
}
}
}