Giter VIP home page Giter VIP logo

thoughts's Introduction

Design Philosophies

Project Structure

This section outlines the structure of my project, which follows a package-oriented design to organize code and promote maintainability. The project is divided into several packages, each serving a specific purpose and layer in my application.

Layers

App

  • Responsibility: Manages start-up and shutdown procedures, accepts and validates external input and output.
  • Subpackages:
    • Services: Provides specific services for the application.
      • API: Handles REST API endpoints.
    • Tooling: Contains various tooling packages.
      • Logfmt: Handles log formatting.
      • Init: Initialize, migrate and seed database.

Business

  • Responsibility: Represents the core business logic of the application.
  • Subpackages:
    • Core: Offer APIs for the business layer. Each subpackage under Core defines the data the project works with.
      • Store: Data access layer responsible for CRUD operations for the data.
    • Database: Manages database-related operations, including but not limited to managing database driver and database migration tools.
    • Web: Includes packages specific to the web application.
      • Middleware: Defines middleware for the web layer.

Foundation

  • Responsibility: Houses packages that are foundational to ALL businesses. Logging should not occur within the Foundation layer, and packages within Foundation should not import each other.
  • Subpackages:
    • Logger: Helper functions to use log/slog package.
    • Web: Extension to the CHI router for extended functionality.

Notes

  • Core Package: The Core package within the Business layer serves as the entry point for the business layer and should be imported by other packages in app layer that need business-related functionality.
  • Stores Package: Packages within the Stores subpackage should not import each other. If a package needs to access multiple entities, use the Core package instead.
  • Logging: Logging should not occur within the Foundation layer.

By adhering to this structure, I aim to create a maintainable and scalable codebase that promotes code clarity and separation of concerns.

thoughts's People

Contributors

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