4 Commits

Author SHA1 Message Date
8b18de1735 BRAKING refactor project structure.
Refactor: the project is now divided into a more clear structure, with **Infrastructure** and **Application** layers added.

Refactor: configurations are split into sections for different layers.

Fix: now EF Core related operations, such as migration, should be invoked in `OptixServe.Infrastructure`, with config file and data dir passed into `dotnet ef` command. See `OptixServe.Infrastructure/Utilites/DesignTimeDbContextFactory.cs` for details.

Fix: EF migrations are ignored in gitignore on purpose in early development.
2025-07-11 14:48:50 +08:00
724b1d4dae Add JWT authentication.
Add: JWT authentication in Web API. Related configuration and services are added.
2025-07-10 20:08:48 +08:00
7cce413f79 Add configuration type binding and implement database connection, disable NativeAOT.
Add: binding setting file items to `AppSettings` class so to provide DI access as `IOptions<OptixServeSettings>`.

Add: EF Core and DbContext to access database in services. This results in disabling NativeAOT due to poor supports for *pre-compiled query*, however many design are optimized for AOT for later re-adoption.

Add: `DesignTimeDbContextFactory` to support EF Core migrations in NativeAOT. (Kept for re-enabling AOT.)

Add: `DbInitializer` for ensuring database connecting in startup.

Add: `ConfigurationHelper.CreateDefaultBuilder()` to read configuration files in default locations. Note this method is currently ONLY used by `DesignTimeDbContextFactory`. Refactor is expected.

Add: `CommonErrorDto` for simple error message.

Add: `VersionEndpoint` ONLY for debugging and testing purpose. Verylikely to be removed in the future.

Other: many utilities and fixes easy to understand.

Note: EF Core migrations are excluded in the early development. Not expected to be added in version control before v1.0 beta.
2025-07-09 12:17:25 +08:00
1e4aaf33f9 Init commit. 2025-07-07 14:26:00 +08:00