Giter Site home page Giter Site logo

cricks's Introduction

Cricket Scoring API ๐ŸŒ

.NET SQLite SQL Server MySQL PostgreSQL

Cricks API is a robust and secure web application built with .NET 8.0, providing cricket match scoring and management. It uses Entity Framework Core for data storage and JWT for authentication.

Table of Contents

๐Ÿš€ Features

  • JWT Authentication: Secure authentication using JSON Web Tokens.
  • Role-based Authorization: Access control with predefined user roles.
  • Entity Framework Core: Support for multiple databases including SQLite, SQL Server, MySQL, and PostgreSQL.
  • Swagger UI: Interactive API documentation and testing.

๐Ÿ“š API Endpoints

  • GET /matches: Returns a list of cricket matches.

  • GET /matches/{id}: Returns a specific cricket match by ID.

  • POST /matches: Creates a new cricket match.

  • PUT /matches/{id}: Updates an existing cricket match.

  • DELETE /matches/{id}: Deletes a cricket match.

  • GET /tournament: Returns a list of tournaments.

  • GET /tournament/{id}: Returns a specific tournament by ID.

  • POST /tournament: Creates a new tournament.

  • PUT /tournament/{id}: Updates an existing tournament.

  • DELETE /tournament/{id}: Deletes a tournament.

  • GET /ball: Returns a list of balls.

  • GET /ball/{id}: Returns a specific ball by ID.

  • POST /ball: Creates a new ball.

  • PUT /ball/{id}: Updates an existing ball.

  • DELETE /ball/{id}: Deletes a ball.

๐Ÿ› ๏ธ Setup

Prerequisites

  • .NET 8.0 or later
  • SQLite, SQL Server, MySQL, or PostgreSQL

Installation

  1. Clone the repository
  2. Navigate to the project directory
  3. Restore the packages
  4. Run the application

๐ŸŽฎ Usage

Once the application is running, you can access the Swagger UI at http://localhost:5000/swagger.

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome! Feel free to check issues page. You can also take a look at the contributing guide.

๐Ÿ“ License

This project is MIT licensed.

๐Ÿ“ง Contact

Created by @atiproy - feel free to contact me!

๐Ÿ“– Detailed Documentation

MatchesController

The MatchesController is an API controller that provides cricket match management. It has the following methods:

  • GET /matches: Returns a list of cricket matches.
  • GET /matches/{id}: Returns a specific cricket match by ID.
  • POST /matches: Creates a new cricket match.
  • PUT /matches/{id}: Updates an existing cricket match.
  • DELETE /matches/{id}: Deletes a cricket match.

TournamentController

The TournamentController is an API controller that provides tournament management. It has the following methods:

  • GET /tournament: Returns a list of tournaments.
  • GET /tournament/{id}: Returns a specific tournament by ID.
  • POST /tournament: Creates a new tournament.
  • PUT /tournament/{id}: Updates an existing tournament.
  • DELETE /tournament/{id}: Deletes a tournament.

BallController

The BallController is an API controller that provides ball management. It has the following methods:

  • GET /ball: Returns a list of balls.
  • GET /ball/{id}: Returns a specific ball by ID.
  • POST /ball: Creates a new ball.
  • PUT /ball/{id}: Updates an existing ball.
  • DELETE /ball/{id}: Deletes a ball.

Authentication

The application uses JWT for authentication. The JWT is included in the Authorization header with the Bearer scheme.

Authorization

The application uses role-based authorization. The TournamentController requires the user to have the "Owner" role.

Database

The application uses Entity Framework Core for data storage. The connection string is configured in the appsettings.json file. It supports multiple databases including SQLite, SQL Server, MySQL, and PostgreSQL.

Swagger UI

The application includes Swagger UI for interactive API documentation and testing. You can access it at http://localhost:5000/swagger when the application is running.

cricks's People

Contributors

atiproy 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.