Boilerplate API template includes all the common packages and setup used for API development in this Company.
.envand update according to requirement.
serviceAccountKey.jsonfile for firebase admin sdk.
- To run
docker-compose up(with default configuration will run at
5000and adminer runs at
Run Boilerplate CLI 🖥
docker-compose exec web sh
- After running type
./__debug_bin cliyou will start cli application.
- Choose the commands to run afterwards.
Migration Commands 🛳
||runs migration up command|
||runs migration down command|
||Set particular version but don’t run migration|
||Migrate to particular version|
||Drop everything inside database|
||Create new migration file(up & down)|
||Create crud template|
- Dependency Injection (go-fx)
- Routing (gin web framework)
- Environment Files
- Logging (file saving on production) zap
- Middlewares (cors)
- Middleware transaction
- Database Setup (mysql)
- Models Setup and Automigrate (gorm)
- Implementing Basic CRUD Operation
- CRUD Scaffold Generator
- Migration Runner Implementation
- Live code refresh
- Firebase basic setup.
- GCP Cloud Storage bucket setup.
- Twilio Basic setup.
- Gmail Api Setup.
For Debugging 🐞 Debugger runs at
5002. Vs code configuration is at
.vscode/launch.json which will attach debugger to remote application.
For auto generate of CRUD(Create, ReaD, Update & Delete) api following informations are needed and will be asked in terminal:
resource-name: name of CRUD in upper camelCase. examples:Food,Puppy,ProductCategory etc.
resource-table-name: name of CRUD in lower snake case. examples:food,puppy,product_category etc.
plural-resource-table-name: plural name for the table going to be created. example: foods, puppies, product_categories.
plural-resource-name: plural name of CRUD in Upper camelCase. examples:Foods,Puppies,ProductCategories etc.