Furion Application Framework

repository·v4·Indexed 25 days ago

https://github.com/monksoul/furion

An application framework for .NET/C# applications focused on architectural rigor and engineering certainty. It includes tools for integrating APIs into Angular, Vue, and React clients via Swagger, as well as a schedule-dashboard frontend built with create-react-app and semi.design.

Tokens
8.4K
Snippets
30
Records
60
Agent score
80%

What's inside Furion

  1. Overview of the Furion Framework

    v4
    Furion is an application framework designed to be integrated into any .NET/C# application. It features a modular architecture, zero-dependency design, and comes with built-in enterprise-level development best practices. It supports .NET 5, 6, 7, 8, 9, and 10, and is suitable for cross-platform deployment. The framework provides out-of-the-box toolsets for common tasks such as logging, caching, and database management.
  2. How the Furion GitFlow workflow works

    v4

    The Furion project uses the GitFlow workflow to manage branches. This model separates development, feature implementation, releases, and emergency fixes into distinct branch types to ensure stability in the production environment.

    Branch Types and Roles

    Branch TypeName PatternPurpose
    Main BranchmainRepresents the stable version in production. Only updated via merges from release/* or hotfix/* branches.
    Develop BranchdevelopThe primary integration branch for daily development. Contains all features intended for the next release.
    Feature Branchesfeature/*Used for developing new features or improvements. Created from develop and merged back into develop via Pull Request.
    Release Branchesrelease/*Used for final testing and documentation polishing before a new release. Created from develop and merged into both main and develop.
    Hotfix Brancheshotfix/*Used for urgent production bug fixes. Created from main and merged into both main and develop.
  3. Quickstart: Create a Dynamic API Controller

    v4

    Furion allows you to quickly expose services as APIs using the [DynamicApiController] attribute. To start the application, use Serve.Run(). Once running, the API will be accessible via your configured local host (e.g., http://localhost:5000).

    Serve.Run();
    
    [DynamicApiController]
    public class HelloService
    {
        public string Say() => "Hello, Furion";
    }
  4. Develop a new feature using feature branches

    v4

    To implement a new feature or improvement, follow these steps:

    1. Create a new feature branch from the develop branch:
      git checkout -b feature/your-feature develop
    2. Complete development: Ensure your local code passes all tests.
    3. Push to remote: Push your feature branch to the remote repository.
    4. Submit a Pull Request: Open a Pull Request on GitHub/Gitee targeting the develop branch.
    5. Review and Merge: Wait for at least one maintainer to review and merge your branch into develop.
    git checkout -b feature/your-feature develop
  5. Use Open Iconic Icon Font standalone

    v4

    To use Open Iconic as an icon font without Bootstrap or Foundation, include the default stylesheet and use the oi class with the data-glyph attribute to specify the icon.

    <link href="/open-iconic/font/css/open-iconic.css" rel="stylesheet">
    
    <span class="oi" data-glyph="icon-name" title="icon name" aria-hidden="true"></span>
  6. Set up the Angular client for Furion

    v4

    To integrate the Furion API into an Angular application, follow these steps to prepare your service layer and utility modules:

    1. Generate API Services: Use Swagger Editor to generate typescript-angular code from your API specification. Create an api-services folder in your src directory and place the generated .ts files there.
    2. Add Angular Utilities: Copy the angular-utils.ts file from the Furion repository (clients/angular/angular-utils.ts) to the same level as your api-services folder.
    3. Configure Server Address: Open angular-utils.ts and update the serveConfig object with your server's base URL.
    4. Register ServeModule: Import and add ServeModule to the imports array in your src/app/app.module.ts file.
    import { ServeModule } from "src/angular-utils";
    
    @NgModule({
      declarations: [AppComponent],
      imports: [BrowserModule, AppRoutingModule, ServeModule], // Register ServeModule here
      providers: [],
      bootstrap: [AppComponent],
    })
    export class AppModule {}
  7. Best practices for branch management

    v4

    When contributing to the Furion project, adhere to these guidelines to maintain an orderly development process:

    • Commit Messages: Ensure every commit includes a clear, concise message that follows the project's commit message specifications.
    • Conflict Avoidance: Always ensure your local branch is up-to-date with the target branch (e.g., develop) before attempting to merge to minimize merge conflicts.
  8. Install and Configure CodeMaid 2022

    v4

    CodeMaid is a Visual Studio extension used to improve code quality and readability through code cleaning and formatting.

    Installation

    1. In Visual Studio, go to Extensions > Manage Extensions (or press Ctrl + Shift + X).
    2. Search for 'CodeMaid' in the online marketplace.
    3. Click 'Download' to install.
    4. Restart Visual Studio to activate the extension.

    Configuration

    Adjust cleaning rules and code styles by navigating to Tools > Options > CodeMaid.

  9. Use Open Iconic's Icon Font standalone

    v4

    To use Open Iconic without Bootstrap or Foundation, include the default stylesheet and use the oi class with the data-glyph attribute to specify the icon name.

    <link href="/open-iconic/font/css/open-iconic.css" rel="stylesheet">
    
    <span class="oi" data-glyph="icon-name" title="icon name" aria-hidden="true"></span>