https://github.com/atechguide/graphql-blog-app
Blogging Application
https://github.com/atechguide/graphql-blog-app
graphql-yoga jwt prisma prisma-cloud project
Last synced: 4 months ago
JSON representation
Blogging Application
- Host: GitHub
- URL: https://github.com/atechguide/graphql-blog-app
- Owner: aTechGuide
- License: mit
- Created: 2019-10-02T03:29:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-30T03:58:54.000Z (about 5 years ago)
- Last Synced: 2024-12-31T04:41:57.877Z (over 1 year ago)
- Topics: graphql-yoga, jwt, prisma, prisma-cloud, project
- Language: JavaScript
- Homepage: https://fierce-castle-27103.herokuapp.com/
- Size: 2.23 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Graphql Blog App
This app provides following functionality
- Allows clients to SignUp and SignIn
- Allows authenticated clients to Fetch their profile
- Allows authenticated clients to create, update and delete their post
- Allows client to fetch all the `published` posts and authenticated users to fetch all of their posts
- Allows clients to comment on a post
- Pagination Support
- Sorting Support
# Hosting
Hosted via Prisma Cloud and Heroku
# Links
- Production Instance [Link](https://fierce-castle-27103.herokuapp.com/)
- Local Instance [Link](http://localhost:4000)
# Tech Stack
- GraphQL (using graphql-yoga)
- Prisma
- Prisma Cloud
- JWT
# Getting Started
- Launch Prisma and database
- Create a `.env` file under `prisma` folder with following environment variables
```
POSTGRES_HOST=
POSTGRES_DATABASE=
POSTGRES_USER=
POSTGRES_PASSWORD=
```
- `cd prisma`
- Starting Container: `docker-compose up -d`
- Stopping Services: `docker-compose stop`
- Killing Container: `docker-compose kill`
- Removing Stopped Containers: `docker-compose rm`
- Deploy the prisma Datamodel. From inside `prisma` folder run
- Dev: `prisma deploy -e ../config/dev.env`
- Test: `prisma deploy -e ../config/test.env`
- Prod: `prisma deploy -e ../config/prod.env`
- Install the node dependencies
- `npm install`
- Generate the Schema Dependencies
- Run `npm run get-schema`
- Run the App
- DEV: `npm run dev`
- TEST: `npm run test`
# Reference
- This project was built as a part of [The Modern GraphQL Bootcamp (with Node.js and Apollo)](https://www.udemy.com/course/graphql-bootcamp/) Udemy course by Andrew Mead