Git Product home page Git Product logo

se_work's Introduction

What's this?

This is a backend for the SE work. You can check the API doc on here which is written by ApiFox. It was developed by golang. The framework is gin and the database is sqlite3.

About Auther

The backend is totally written by QiuXiangkai (Dnull), and you can check the commit history to see the details.

How to run

  1. You need to install the Golang env first, which version is 1.21.4.

  2. Run the make to build the project to all platforms.

    make build-all

  3. Check and run the binary file in the build directory.

Develop Convention

This project is layered into three layers: controller, service, and model.

  • controller: In this layer, we will handle the request and response. The controller will call the service to do the business logic.

  • service: In this layer, we will handle the business logic. The service will call the model to do the database operation.

  • model: In this layer, we will handle the database operation. The model will call the database driver to do the database operation.

Thanks to the three-layer architecture, we can easily change the API or the schema and don't need to change the service.

If you want to add any service, you need to first define the interface in the service, and then implement it in the service/impl directory.

model/restAPI is used for receiving the data and sending the response. You can NOT change it unless the API is changed.

model/DTO is used to transfer the data between different layers, you can define any if you need.

schema is used for defining the database schema. Changing it will cause the database to be recreated.

mock is used for mocking the air conditioners.

All the code should follow the Golang Code Style from Google

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.