Coder Social home page Coder Social logo

kemalkochekov / jwt-backend-application Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 48 KB

Backend Application with JWT-based Authentication.

Makefile 2.08% Go 96.62% Dockerfile 1.30%
api backend-architecture backend-service docker docker-compose fiber go jwt-authentication postgres postman

jwt-backend-application's Introduction

JWT Backend Application

This is a backend development app that utilizes JSON Web Tokens (JWT) for authentication. It provides an API that allows clients to authenticate and access protected resources.

Table of Contents

Prerequisites

Before running this application, ensure that you have the following prerequisites installed:

Installation

  1. Clone this repository
  git clone https://github.com/kemalkochekov/JWT-Backend-Application.git
  1. Navigate to the project directory:
  cd JWT-Backend-Application
  1. Build the Docker image:
  docker-compose build

Usage

  1. Start the Docker containers:
  docker-compose up
  1. The application will be accessible at:
  localhost:8080

API Endpoints

The following API endpoints are available:

For detailed API documentation, including examples, request/response structures, and authentication details, please refer to the

View API Doc Button

Architecture Layers

I've designed a structured Go (Golang) backend architecture using Fiber, PostgreSQL, Redis, JWT auth middleware, and Docker, ensuring a robust and organized system.

JWTbackend

API Flow without JWT Authentication Middleware

Untitled-2023-11-28-1052

API Flow with JWT Authentication Middleware

with

Linting and Code Quality

This project maintains code quality using golangci-lint, a fast and customizable Go linter. golangci-lint checks for various issues, ensures code consistency, and enforces best practices, helping maintain a clean and standardized codebase.

Linting Installation

To install golangci-lint, you can use brew:

  brew install golangci-lint

Linting Usage

  1. Configuration:

After installing golangci-lint, create or use a personal configuration file (e.g., .golangci.yml) to define specific linting rules and settings:

  golangci-lint run --config=.golangci.yml

This command initializes linting based on the specified configuration file.

  1. Run the linter:

Once configuration is completed, you can execute the following command at the root directory of your project to run golangci-lint:

  golangci-lint run

This command performs linting checks on your entire project and provides a detailed report highlighting any issues or violations found.

  1. Customize Linting Rules:

You can customize the linting rules by modifying the .golangci.yml file.

For more information on using golangci-lint, refer to the golangci-lint documentation.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request. Ensure that you follow the existing code style and conventions.

License

This project is licensed under the MIT License.

jwt-backend-application's People

Contributors

kemalkochekov avatar

Stargazers

 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.