Fractal Platform codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
This codebase was created to demonstrate a fully fledged fullstack application built with Fractal Platform including CRUD operations, authentication, routing, pagination, and more.
We've gone to great lengths to adhere to the Fractal Platform community styleguides & best practices.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
We created special RealWorldComparator web app to compare other FE/BE/Fullstack implementations with Fractal Platform.
At the moment Fractal Platform has one of the smallest RealWorld fullstack implementation in 34kb of sources only:
File Extension | Length |
---|---|
.html | 20 kb |
.cs | 9 kb |
.json | 5 kb |
Fractal Platform is low code platform to build numerous different web applications with clean architecture in short time.
RealWorld (conduit) application contains only three parts:
- Layouts Html templates of our web application. Html is not mixed with other code and can be provided by UI designers.
- C# backend All backend logic is placed in one .cs file with 331 lines of code.
- Database The database is represented as a set of JSON files. Some of the JSON files describe dimensions such as validation, security, UI, etc.
In the Fractal Platform, we do not mix different layers with each other, and we have achieved next andvantages:
- Clean architecture. HTML is HTML. The database is the database. Validation is validation. C# code is C# code. We don't mix different aspects of functionality in one file (e.g., dynamic HTML in a JS file or validation logic in HTML tags).
- Flexible architecture. In many cases, we can add or remove features from our application without significant changes to the code.
- Less code. Web applications contain approximately ~5-50 less of code than typical web solutions.
- Easy to read code. The code consists only of HTML, JSON, and C# files with a simple structure.
- Easy to deploy. The RealWorld application can be deployed to Fractal Cloud within a few seconds by simply running the FractalPlatform.Deployment console application.
- Good performance of web apps. The web application works quickly because the engine and database have numerous optimizations for rendering the applications.
And we have some disadvantages:
- We don't use REST or web page routing to provide communication between Frontent and Backend parts of our Fullstack web application, because it has no significant impact on user experience by our opinion.
- Install Visual Studio Community or other IDE which supports .NET code
- Install .NET Core 8.0
- Download/Clone Fractal Platform solution
- Open FractalPlatform_Examples.sln solution in IDE
- Switch to FractalPlatform.Deployment project and set "AppNames":["RealWorld"] key in appsettings.config config. Ensure that DeploymentKey in this config is right.
- Run FractalPlatform.Deployment project to deploy RealWorld application in Fractal Cloud. After deploying RealWorld application will be opened in the your default web browser as https://fraplat.com/jupiter/RealWorld.