Skip to content

Commit 84784e0

Browse files
committed
Updated Templates
1 parent be37fe8 commit 84784e0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

TEMPLATE_SETUP.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ This guide helps you set up your new repository after creating it from this temp
55
## 🚀 Initial Setup
66

77
### 1. Update Module Name
8+
89
Edit `go.mod` and change the module name:
10+
911
```go
1012
// Change from:
1113
module github.com/MitulShah1/golang-rest-api-template
@@ -15,61 +17,74 @@ module github.com/YOUR_USERNAME/YOUR_REPO_NAME
1517
```
1618

1719
### 2. Update Repository References
20+
1821
Search and replace these references in your codebase:
22+
1923
- `github.com/MitulShah1/golang-rest-api-template``github.com/YOUR_USERNAME/YOUR_REPO_NAME`
2024
- `MitulShah1/golang-rest-api-template``YOUR_USERNAME/YOUR_REPO_NAME`
2125

2226
### 3. Update README.md
27+
2328
- Change the project title
2429
- Update badges to point to your repository
2530
- Modify the description to match your project
2631

2732
### 4. Update GitHub Actions
33+
2834
In `.github/workflows/go.yml`, update the repository name in badges if needed.
2935

3036
### 5. Update Docker Configuration
37+
3138
In `docker-compose.yml`, consider updating service names to match your project.
3239

3340
## 🔧 Customization Options
3441

3542
### Database Configuration
43+
3644
- Update database connection settings in `config/config.go`
3745
- Modify migration files in `package/database/migrations/`
3846
- Update database driver if switching from MySQL
3947

4048
### API Endpoints
49+
4150
- Modify existing handlers in `internal/handlers/`
4251
- Add new endpoints following the established pattern
4352
- Update Swagger documentation for new endpoints
4453

4554
### Middleware
55+
4656
- Customize middleware in `package/middleware/`
4757
- Add authentication/authorization as needed
4858
- Configure CORS settings for your domain
4959

5060
### Environment Variables
61+
5162
- Update `.env.example` with your specific configuration
5263
- Add new environment variables as needed
5364
- Document all required environment variables
5465

5566
## 📝 Best Practices for Template Usage
5667

5768
### 1. Keep the Structure
69+
5870
- Maintain the established project structure
5971
- Follow the existing patterns for handlers, services, and repositories
6072
- Use the provided middleware and utilities
6173

6274
### 2. Testing
75+
6376
- Write tests for all new functionality
6477
- Follow the existing test patterns
6578
- Maintain high test coverage
6679

6780
### 3. Documentation
81+
6882
- Update Swagger documentation for new endpoints
6983
- Keep README.md up to date
7084
- Document any new configuration options
7185

7286
### 4. CI/CD
87+
7388
- The GitHub Actions workflow is ready to use
7489
- Update repository secrets as needed
7590
- Configure deployment targets
@@ -105,6 +120,7 @@ make build
105120
## 🤝 Support
106121

107122
If you encounter issues with the template:
123+
108124
1. Check the existing issues in this repository
109125
2. Create a new issue with detailed information
110126
3. Consider contributing back improvements

0 commit comments

Comments
 (0)