Skip to content

Commit 32133bb

Browse files
authored
Merge pull request #8 from AHS12/dev
Release Candidate for V1.0.0
2 parents c95ce63 + 4f35742 commit 32133bb

File tree

10 files changed

+666
-111
lines changed

10 files changed

+666
-111
lines changed

.github/pull_request_template.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Description
2+
3+
Brief summary of changes and motivation.
4+
5+
Fixes # (issue)
6+
7+
## Type of Change
8+
9+
- [ ] Bug fix
10+
- [ ] New feature
11+
- [ ] Breaking change
12+
- [ ] Documentation update
13+
14+
## Testing
15+
16+
- [ ] Tests added/updated
17+
- [ ] All tests pass locally
18+
- [ ] Tested with both tenancy modes (if applicable)
19+
20+
**Test Environment:**
21+
- PHP:
22+
- Laravel:
23+
24+
## Checklist
25+
26+
- [ ] Code follows project style
27+
- [ ] Self-reviewed code
28+
- [ ] Updated documentation
29+
- [ ] Backward compatible (or breaking change documented)
30+
- [ ] No new warnings/errors
31+
32+
## Additional Notes
33+
34+
Any extra context or screenshots.

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
[mdazizulhakim.cse@gmail.com](mdazizulhakim.cse@gmail.com).
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# laravel-setanjo - Multi-Tenant Laravel Settings Package
1+
# laravel-setanjo - Laravel Settings Package with Multi-Tenant Support
22

33
<p align="center">
44
<a href="https://github.com/ahs12/laravel-setanjo/actions"><img src="https://github.com/ahs12/laravel-setanjo/actions/workflows/run-tests.yml/badge.svg" alt="Build Status"></a>
@@ -7,16 +7,18 @@
77
<a href="https://packagist.org/packages/ahs12/laravel-setanjo"><img src="https://img.shields.io/packagist/l/ahs12/laravel-setanjo" alt="License"></a>
88
</p>
99

10-
A powerful Laravel package for managing application settings with multi-tenant support. Store global settings or tenant-specific configurations with automatic type casting, caching, and a clean API. Perfect for A/B testing, feature flags, and user preferences.
10+
A powerful Laravel package for managing application settings and configurations. Store global application settings or model-specific configurations (user preferences, company settings, etc.) with automatic type casting, caching, and a clean API. Perfect for feature flags, A/B testing, user preferences, and dynamic configuration management.
11+
12+
**Note**: This package does **not** provide multi-tenancy features for your application. However, if your Laravel project already has multi-tenancy implemented, this package can store tenant-specific settings alongside your existing tenant architecture.
1113

1214
## Features
1315

14-
- 🏢 **Multi-Tenant Support**: Both strict and polymorphic tenancy modes
15-
- 🗃️ **Polymorphic Storage**: Store settings for any model type
16-
- 🏛️ **Global Settings**: Settings without any tenant scope
16+
- 🏢 **Multi-Tenant Ready**: Works with existing multi-tenant applications
17+
- 🗃️ **Model-Specific Settings**: Store settings for any Eloquent model (User, Company, etc.)
18+
- 🏛️ **Global Settings**: Application-wide settings without model scope
1719
-**Caching**: Optional caching with configurable cache store
18-
- 🔒 **Validation**: Validate tenant models and prevent unauthorized access
19-
- 📦 **Clean API**: Simple, intuitive API inspired by popular packages
20+
- 🔒 **Validation**: Validate models and prevent unauthorized access
21+
- 📦 **Clean API**: Simple, intuitive API for setting and retrieving values
2022
- 🧪 **Fully Tested**: Comprehensive test suite included
2123
-**Type Safety**: Automatic type detection and conversion
2224

SECURITY.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
We take security seriously and provide security updates for the following versions of laravel-setanjo:
6+
7+
| Version | Supported | Laravel Compatibility |
8+
| ------- | ------------------ | -------------------- |
9+
| 1.x.x | :white_check_mark: | Laravel 10.x, 11.x, 12.x |
10+
| < 1.0 | :white_check_mark: | Laravel 10.x, 11.x, 12.x |
11+
12+
**Note**: Only the latest major version receives security updates. We recommend keeping your installation up to date with the latest stable release.
13+
14+
## Reporting a Vulnerability
15+
16+
We appreciate responsible disclosure of security vulnerabilities. If you discover a security issue, please follow these steps:
17+
18+
### How to Report
19+
20+
**Please DO NOT create a public GitHub issue for security vulnerabilities.**
21+
22+
Instead, report security issues privately by:
23+
24+
1. **Email**: Send details to [mdazizulhakim.cse@gmail.com](mdazizulhakim.cse@gmail.com) or the package maintainer directly
25+
2. **GitHub Security Advisory**: Use GitHub's private vulnerability reporting feature
26+
27+
28+
### What to Include
29+
30+
When reporting a security vulnerability, please include:
31+
32+
- **Description** of the vulnerability and its potential impact
33+
- **Steps to reproduce** the issue with detailed instructions
34+
- **Affected versions** or version ranges
35+
- **Proof of concept** code or screenshots (if applicable)
36+
- **Suggested fix** or mitigation (if you have ideas)
37+
- **Your contact information** for follow-up questions
38+
39+
### Response Timeline
40+
41+
We are committed to responding to security reports promptly:
42+
43+
- **Initial Response**: Within 48 hours of report
44+
- **Assessment**: Within 7 days we'll provide initial assessment
45+
- **Fix Development**: Critical issues will be prioritized for immediate fixes
46+
- **Disclosure**: Coordinated disclosure after fix is available
47+
48+
### What to Expect
49+
50+
**If the vulnerability is accepted:**
51+
- We'll work with you to understand and reproduce the issue
52+
- Develop and test a fix
53+
- Release a security patch
54+
- Credit you in the security advisory (if desired)
55+
- Coordinate public disclosure timing
56+
57+
**If the vulnerability is declined:**
58+
- We'll explain why it's not considered a security issue
59+
- Provide guidance if it's a configuration or usage issue
60+
- Suggest alternative reporting channels if appropriate
61+
62+
## Security Considerations
63+
64+
### Multi-Tenant Security
65+
66+
This package handles multi-tenant data. Key security considerations:
67+
68+
- **Tenant Isolation**: Settings are properly isolated between tenants
69+
- **Authorization**: Validate tenant access before reading/writing settings
70+
- **Model Validation**: Ensure only allowed models can be used as tenants
71+
72+
### Best Practices
73+
74+
When using laravel-setanjo:
75+
76+
1. **Validate Input**: Always validate setting values before storage
77+
2. **Sanitize Output**: Be cautious when displaying user-provided setting values
78+
3. **Access Control**: Implement proper authorization for setting management
79+
4. **Audit Trail**: Consider logging sensitive setting changes
80+
5. **Cache Security**: Ensure cache stores are properly secured
81+
82+
### Known Security Considerations
83+
84+
- Settings stored in database are not encrypted by default
85+
- Cache invalidation timing may expose information about setting changes
86+
- Polymorphic mode requires careful tenant model validation
87+
88+
## Security Updates
89+
90+
Security updates will be:
91+
92+
- Released as patch versions (e.g., 1.0.x)
93+
- Documented in [CHANGELOG.md](CHANGELOG.md) with security labels
94+
- Announced through GitHub releases
95+
- Tagged with `security` label
96+
97+
## Acknowledgments
98+
99+
We thank the security research community for helping keep laravel-setanjo secure. Security researchers who responsibly disclose vulnerabilities will be acknowledged in:
100+
101+
- Security advisories
102+
- CHANGELOG.md
103+
- Hall of fame (if established)
104+
105+
## Contact
106+
107+
For security-related questions or concerns:
108+
109+
- **Security Issues**: Use private reporting methods above
110+
- **General Security Questions**: Create a GitHub discussion
111+
- **Documentation**: Suggest improvements via pull request
112+
113+
---
114+
115+
**Remember**: Security is everyone's responsibility. If you're unsure whether something is a security issue, err on the side of caution and report

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
22
"name": "ahs12/laravel-setanjo",
3-
"description": "Multi-tenant Laravel settings package with polymorphic support",
3+
"description": "Laravel settings package for managing application configurations, user preferences, feature flags, and A/B testing with multi-tenant support",
44
"keywords": [
55
"laravel",
66
"settings",
7+
"configuration",
8+
"feature-flags",
9+
"ab-testing",
10+
"user-preferences",
711
"multi-tenant",
8-
"polymorphic",
9-
"configuration"
12+
"polymorphic"
1013
],
1114
"homepage": "https://github.com/ahs12/laravel-setanjo",
1215
"license": "MIT",

resources/views/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)