A boilerplate / template for a WebAPI server based on ASP.Net core.
This API boilerplate includes the folllowing:
- Role based JWT authentication.
- Web API Helpers which standadizes responses, maps errors, etc...
- An implmentation of CSV Error logger.
- A business library and model projects for code separation.
- A core library with the following
- Custom data model attributes
- Database adapter
- Helper functions for hashing, encrypting, compression, etc...
- A constants library for commonly used constants.
Before using the code in production
- In Config.cs in Core.Constants
- Security.EncryptionKey
- In appsettings.json
- Database connection string.
- This string should be in ecrypted format. Encrypted with the new encryption key.
- JWT secret, issuer and audience
- Database connection string.
- In launchsettings.json,
- Change SSL port
- Change applicationURL
- In Base class in BusinessLib, uncomment the line that establishes db connection
- HelpersLib in BusineesLib
- HelpersController in API