Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thenamankumar/api.gitfa.me
https://github.com/thenamankumar/api.gitfa.me
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thenamankumar/api.gitfa.me
- Owner: thenamankumar
- Created: 2017-11-14T17:50:23.000Z (about 7 years ago)
- Default Branch: develop
- Last Pushed: 2018-09-11T19:29:07.000Z (over 6 years ago)
- Last Synced: 2024-10-02T09:54:19.710Z (4 months ago)
- Language: JavaScript
- Size: 316 KB
- Stars: 7
- Watchers: 4
- Forks: 6
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# api.gitfa.me
The graphql api for [gitfame](https://github.com/hereisnaman/gitfame)## Technologies
|**Name**|**Description**|
|----|---|
|**graphq-yoga**| with graphql-tools as its core, it provides a better way of building graphql aplications|
|**prisma**| db as a graphql api, this project uses the postgres connector|
|**apollo engine**| Tracking and analytics for the gql api|
|**prettier**| pre-commit code formating|## Project Structure
.
├── app
│ ├── actions
| ├── database # database files
│ │ ├── api.graphql # db gql api generated by prisma (DO NOT TOUCH)
│ │ ├── schema.graphql # db schema defined via gql type system
│ │ └── ...
| ├── models # app gql api models
| ├── resolvers
│ │ ├── query # query field resolvers
│ │ ├── mutation # mutation field resolvers
│ │ ├── subscription # subscription field resolvers
│ │ └── ...
| ├── index.js # entry point
| ├── schema.grphql # app gql api schema
│ └── ...
├── ci # deployment and testing scripts
├── env # dev and prod env files
└── ...## Setup Environment
Create `env/dev.env` and `env/prod.env` for development and production respectively. Read [this](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token) to generate github token.### Example env:
```
NODE_ENV=development
API_BASE=http://localhost:4000/
DB_USER= #postgres user
DB_SECRET= #postgres pass
DB_API_NAME= #cluster name
DB_API_STAGE= #cluster stage
DB_API_SECRET= #secret to sign and verify JWT token for prisma api
APOLLO_ENGINE_KEY=
SENTRY_KEY=
GITHUB_TOKEN= # github personal access token
```## Quick Start (Development)
```
# Install Prisma and Postgres images
DB_USER= DB_SECRET= docker-compose up -d# Install dependencies
yarn# Deploy Prisma
yarn prisma-dev# Start dev server on localhost:4000
yarn dev
```
Frontend repo :