Skip to content

Commit 632305c

Browse files
committed
license, contributing, changelog and versioning updates
1 parent 12cc407 commit 632305c

File tree

7 files changed

+514
-26
lines changed

7 files changed

+514
-26
lines changed

CHANGELOG.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
- Apache 2.0 License
12+
- CONTRIBUTING.md with development guidelines and testing procedures
13+
- CHANGELOG.md to track project changes
14+
15+
### Changed
16+
- Updated README.md to include license section
17+
18+
## [1.0.0] - 2024-10-08
19+
20+
### Added
21+
- Initial CloudFront reverse proxy CloudFormation template
22+
- Support for custom domain configuration with automatic certificate and DNS management
23+
- Multiple price class options (PriceClass_100, PriceClass_200, PriceClass_All)
24+
- CloudFront access logging configuration
25+
- Automated cleanup template for removing proxy resources
26+
- One-click deploy buttons for multiple AWS regions
27+
- GitHub Actions workflow for automated S3 template deployment
28+
- Comprehensive README with setup instructions and SDK configuration examples
29+
- Support for LaunchDarkly client-side SDKs (JavaScript, React, iOS, Android, Flutter)
30+
- Cache policies optimized for LaunchDarkly endpoints:
31+
- Standard caching for flag evaluations (5min default TTL)
32+
- No-cache policy for streaming endpoints (0-1s TTL)
33+
- Origin request policy for proper header and query string forwarding
34+
- CORS configuration for client-side SDK compatibility
35+
36+
### Infrastructure
37+
- CloudFront Distribution with global edge locations
38+
- Multiple LaunchDarkly origin configurations:
39+
- `clientsdk.launchdarkly.com` - Flag polling and evaluations
40+
- `clientstream.launchdarkly.com` - Real-time streaming
41+
- `events.launchdarkly.com` - Event tracking
42+
- `app.launchdarkly.com` - SDK management
43+
- Route 53 DNS record creation for custom domains
44+
- ACM certificate provisioning and validation
45+
- S3 bucket configuration for access logging (optional)
46+
47+
### Documentation
48+
- Multi-region deployment instructions
49+
- Custom domain setup guide
50+
- SDK configuration examples for React applications
51+
- Monitoring and troubleshooting guides
52+
- Cleanup procedures (both automated and manual)
53+
- Price class comparison and recommendations
54+
- Multi-project usage guidelines
55+
56+
---
57+
58+
## Release Notes
59+
60+
### Version Format
61+
- **Major versions** (x.0.0): Breaking changes or significant new features
62+
- **Minor versions** (x.y.0): New features, backwards compatible
63+
- **Patch versions** (x.y.z): Bug fixes, backwards compatible
64+
65+
### Categories
66+
- **Added**: New features
67+
- **Changed**: Changes in existing functionality
68+
- **Deprecated**: Soon-to-be removed features
69+
- **Removed**: Removed features
70+
- **Fixed**: Bug fixes
71+
- **Security**: Security-related changes
72+
- **Infrastructure**: AWS resource or template changes
73+
74+
### Links
75+
- [Keep a Changelog](https://keepachangelog.com/)
76+
- [Semantic Versioning](https://semver.org/)
77+
78+
[Unreleased]: https://github.com/your-org/cloudfront-reverse-proxy/compare/v1.0.0...HEAD
79+
[1.0.0]: https://github.com/your-org/cloudfront-reverse-proxy/releases/tag/v1.0.0

CONTRIBUTING.md

Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
# Contributing to AWS CloudFront Proxy for LaunchDarkly
2+
3+
Thank you for your interest in contributing to this project! We welcome contributions from the community.
4+
5+
## Code of Conduct
6+
7+
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors. Please be kind, professional, and constructive in all interactions.
8+
9+
## How to Contribute
10+
11+
### Reporting Issues
12+
13+
Before creating a new issue, please:
14+
15+
1. **Search existing issues** to avoid duplicates
16+
2. **Use a clear, descriptive title** that summarizes the problem
17+
3. **Provide detailed information** including:
18+
- Steps to reproduce the issue
19+
- Expected vs. actual behavior
20+
- AWS region and CloudFormation stack details
21+
- LaunchDarkly SDK version and configuration
22+
- Error messages or logs (sanitized of sensitive data)
23+
24+
### Suggesting Enhancements
25+
26+
We welcome suggestions for new features or improvements:
27+
28+
1. **Check existing issues** to see if your idea has been discussed
29+
2. **Create a new issue** with the "enhancement" label
30+
3. **Describe the enhancement** including:
31+
- Use case and problem it solves
32+
- Proposed solution
33+
- Any alternatives considered
34+
- Potential impact on existing users
35+
36+
### Pull Requests
37+
38+
1. **Fork the repository** and create a feature branch
39+
2. **Make your changes** following the guidelines below
40+
3. **Test your changes** thoroughly
41+
4. **Update documentation** as needed
42+
5. **Submit a pull request** with a clear description
43+
44+
#### Pull Request Guidelines
45+
46+
- Use a clear, descriptive title
47+
- Reference any related issues (e.g., "Fixes #123")
48+
- Provide a detailed description of changes
49+
- Include testing instructions
50+
- Keep changes focused and atomic
51+
52+
## Development Guidelines
53+
54+
### CloudFormation Templates
55+
56+
- **Validate templates** using `aws cloudformation validate-template`
57+
- **Follow AWS best practices** for resource naming and tagging
58+
- **Use parameters** for configurable values
59+
- **Include comprehensive outputs** for important resource references
60+
- **Add detailed descriptions** for parameters and resources
61+
62+
#### Template Structure
63+
```yaml
64+
AWSTemplateFormatVersion: '2010-09-09'
65+
Description: 'Clear, concise description'
66+
67+
Parameters:
68+
# Parameters with descriptions and constraints
69+
70+
Resources:
71+
# Resources with logical names and proper dependencies
72+
73+
Outputs:
74+
# Important outputs with descriptions
75+
```
76+
77+
### Documentation
78+
79+
- **Keep README.md updated** with any new features or changes
80+
- **Use clear, actionable language** in documentation
81+
- **Include examples** for configuration options
82+
- **Test all documented commands** to ensure they work
83+
- **Update deployment tables** if adding new regions
84+
85+
### Testing
86+
87+
#### Manual Testing Checklist
88+
89+
Before submitting changes, please verify:
90+
91+
- [ ] CloudFormation template validates without errors
92+
- [ ] Stack deploys successfully in at least one AWS region
93+
- [ ] Custom domain configuration works (if applicable)
94+
- [ ] LaunchDarkly SDK can connect through the proxy
95+
- [ ] Streaming endpoints work correctly
96+
- [ ] Stack cleanup completes successfully
97+
- [ ] One-click deploy links work correctly
98+
99+
#### Testing Commands
100+
101+
```bash
102+
# Validate CloudFormation template
103+
aws cloudformation validate-template --template-body file://infrastructure/templates/cloudfront.yaml
104+
105+
# Deploy test stack
106+
aws cloudformation deploy \
107+
--template-file infrastructure/templates/cloudfront.yaml \
108+
--stack-name test-ld-cloudfront-proxy \
109+
--parameter-overrides UseCustomDomain=false \
110+
--capabilities CAPABILITY_IAM
111+
112+
# Test SDK connectivity (replace with your values)
113+
Once deployed, configure your LaunchDarkly SDKs to use your CloudFront proxy by specifying the options with the reverse proxy URL.
114+
115+
### React SDK (React Applications)
116+
```javascript
117+
const LDProvider = await asyncWithLDProvider({
118+
clientSideID: 'your-client-side-id',
119+
context: {
120+
kind: "device",
121+
key: "unique-device-id"
122+
},
123+
options: {
124+
baseUrl: 'https://flags.my-company-domain.com',
125+
eventsUrl: 'https://flags.my-company-domain.com',
126+
streamUrl: 'https://flags.my-company-domain.com
127+
}
128+
});
129+
```
130+
131+
# Cleanup test stack
132+
aws cloudformation delete-stack --stack-name test-ld-cloudfront-proxy
133+
```
134+
135+
## Style Guidelines
136+
137+
### CloudFormation
138+
139+
- Use **PascalCase** for resource logical names
140+
- Use **kebab-case** for parameter names
141+
- Include **descriptions** for all parameters and important resources
142+
- Group related resources together
143+
- Use consistent indentation (2 spaces)
144+
145+
### Documentation
146+
147+
- Use **clear, concise language**
148+
- Include **code examples** where helpful
149+
- Use **consistent formatting** for commands and code
150+
- Keep **line lengths reasonable** (80-100 characters)
151+
152+
## Release Process
153+
154+
This project uses automated deployments via GitHub Actions and follows semantic versioning:
155+
156+
1. **Changes to `infrastructure/templates/cloudfront.yaml`** main branch trigger automatic S3 updates
157+
2. **One-click deploy links** are automatically updated
158+
3. **Templates are validated** before deployment
159+
160+
### Version Management
161+
162+
This project uses multiple version tracking methods:
163+
164+
#### 1. Git Tags (Primary)
165+
```bash
166+
# Create a new release version
167+
git tag -a v1.1.0 -m "Add new caching policy for streaming endpoints"
168+
git push origin v1.1.0
169+
170+
# List all versions
171+
git tag -l
172+
```
173+
174+
#### 2. VERSION File
175+
Update the `VERSION` file in the repository root with the current version number.
176+
177+
#### 3. CloudFormation Template Metadata
178+
Both CloudFormation templates include version metadata:
179+
```yaml
180+
Metadata:
181+
Version: '1.1.0'
182+
LastUpdated: '2024-10-08'
183+
Author: 'AWS CloudFront Proxy for LaunchDarkly'
184+
```
185+
186+
#### 4. GitHub Releases
187+
Create GitHub releases from tags to provide user-facing release notes.
188+
189+
### Version Update Workflow
190+
191+
When creating a new release:
192+
193+
1. **Update VERSION file** with new version number
194+
2. **Update CloudFormation template metadata** in both templates
195+
3. **Update CHANGELOG.md** moving items from "Unreleased" to new version
196+
4. **Commit changes** with message like "Bump version to v1.1.0"
197+
5. **Create and push Git tag** `git tag -a v1.1.0 -m "Release description"`
198+
6. **Create GitHub release** from the tag with release notes
199+
200+
### Branch Strategy
201+
202+
- **`main` branch** contains production-ready code
203+
- **Feature branches** should be created from `main`
204+
- **Pull requests** should target `main`
205+
206+
## Getting Help
207+
208+
If you need help or have questions:
209+
210+
1. **Check existing issues** and documentation first
211+
2. **Create a new issue** with the "question" label
212+
3. **Provide context** about what you're trying to achieve
213+
214+
## Recognition
215+
216+
Contributors will be recognized in the project. Significant contributions may be highlighted in release notes.
217+
218+
## License
219+
220+
By contributing to this project, you agree that your contributions will be licensed under the Apache License 2.0, the same license that covers the project. See the [LICENSE](LICENSE) file for details.
221+
222+
---
223+
224+
Thank you for contributing to make this CloudFront reverse proxy solution better for everyone! 🚀

0 commit comments

Comments
 (0)