Giter Club home page Giter Club logo

blogapp-graphql-api's Introduction

GraphQL API for Blog App with Authentication and Authorization

This repository contains the GraphQL API backend for a blog application, offering user authentication, registration, post management, and role-based authorization features. The API is designed to integrate seamlessly with a frontend application, providing a secure and efficient way to manage users and blog posts.

Features

  • User Authentication and Registration:

    • Secure user registration and login functionality.
    • Password hashing for enhanced security.
  • Post Management:

    • Authenticated users can create, edit, and delete their own posts.
    • Posts are accessible with author details and creation dates.
  • Authorization:

    • Role-based authorization to control access to certain features.
    • Only user will see the unpublished posts when authenticated and authorized as the author of them

Tech Stack

  • Backend:

    • Node.js
    • PostgreSQL for storing user information and blog posts.
    • GraphQL API for efficient communication with the frontend.
  • Authentication:

    • JSON Web Tokens (JWT) for secure user authentication.

Getting Started

  1. Clone the repository:

    git clone https://github.com/Aimeana100/blogApp-graphql-api.git
  2. Install dependencies:

    cd blogApp-graphql-api
    npm install
    
    
  3. Configure environment variables:

    • Create a .env file in the root of the project and add the following variables:

    • Set up environment variables for PostgreSQL connection, JWT secret, etc.

  4. Run the application:

npm run dev

Access the GraphQL playground at http://localhost:4000 in your browser

blogapp-graphql-api's People

Contributors

aimeana100 avatar anatholetech avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.