Skip to content

Commit 69c17a3

Browse files
authored
feat: [WPN-17, WPN-18, WPN-19] Command line feature, error message handling for env compatibility and docs update (#33)
* feat: [WPN-17] Command line function to generate VAPID keys * fix: [WPN-18] Handle error messages for env compatibility properly * docs: [WPN-19] Update documentation and Readme
1 parent f887962 commit 69c17a3

8 files changed

Lines changed: 717 additions & 8 deletions

File tree

CONTRIBUTING.md

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# Contributing to PushForge
2+
3+
Thank you for your interest in contributing to PushForge! This document provides guidelines and instructions for contributing to this project.
4+
5+
## Code of Conduct
6+
7+
By participating in this project, you agree to uphold our Code of Conduct, which expects all contributors to be respectful and create a harassment-free experience for everyone.
8+
9+
## Contribution Workflow
10+
11+
We follow a structured workflow for all contributions. Here's the process:
12+
13+
### 1. Create an Issue
14+
15+
- Before making any changes, start by creating an issue in the [GitHub issue tracker](https://github.com/draphy/pushforge/issues)
16+
- Clearly describe the bug, feature, or improvement you want to address
17+
- Wait for a Linear issue number to be assigned in the comments
18+
19+
### 2. Branch Naming Convention
20+
21+
Create a branch with the following naming format:
22+
23+
```
24+
username/wpn-issuenumber-issuetitle
25+
```
26+
27+
Example:
28+
29+
```
30+
johndoe/wpn-123-fix-payload-encryption
31+
```
32+
33+
### 3. Fork and Clone the Repository
34+
35+
- Fork the repository to your GitHub account
36+
- Clone your fork to your local machine
37+
- Add the upstream repository as a remote
38+
39+
```bash
40+
git clone https://github.com/yourusername/pushforge.git
41+
cd pushforge
42+
git remote add upstream https://github.com/draphy/pushforge.git
43+
```
44+
45+
### 4. Set Up the Development Environment
46+
47+
```bash
48+
# Install dependencies
49+
pnpm install
50+
51+
# Build packages
52+
pnpm build
53+
```
54+
55+
### 5. Make Your Changes
56+
57+
- Create a new branch with the proper naming convention
58+
- Make your changes following the coding conventions
59+
- Write or update tests as needed
60+
- Update documentation if necessary
61+
62+
### 6. Commit Guidelines
63+
64+
We use [Conventional Commits](https://www.conventionalcommits.org/) for clear and meaningful commit messages.
65+
66+
Format:
67+
68+
```
69+
<type>: [WPN-<issue-number>] <description>
70+
```
71+
72+
Where `type` is one of:
73+
74+
- `feat`: A new feature
75+
- `fix`: A bug fix
76+
- `bug`: A bug fix (alternative to fix)
77+
- `docs`: Documentation changes
78+
- `test`: Adding or updating tests
79+
- `ci`: CI configuration changes
80+
- `refactor`: Code refactoring
81+
- `perf`: Performance improvements
82+
- `chore`: Maintenance tasks
83+
- `revert`: Reverting changes
84+
- `release`: Release-related changes
85+
86+
Example:
87+
88+
```
89+
feat: [WPN-123] Add support for Safari push notifications
90+
```
91+
92+
### 7. Pull Request Process
93+
94+
1. Push your changes to your fork
95+
2. Create a pull request against the main repository
96+
3. Use this format for the PR title:
97+
```
98+
<type>: [WPN-<issue-number>] <Title starting with capital letter>
99+
```
100+
Example:
101+
```
102+
feat: [WPN-123] Add support for Safari push notifications
103+
```
104+
4. Provide a detailed description in the PR
105+
5. Link the PR to the relevant issue
106+
6. Ensure all status checks pass
107+
7. Request a review from at least one maintainer
108+
109+
Pull requests require approval from at least one reviewer before they can be merged.
110+
111+
### 8. Code Quality Tools
112+
113+
Before submitting your PR, ensure your code passes all checks by running:
114+
115+
```bash
116+
# Format and lint with Biome
117+
pnpm biome:format
118+
pnpm biome:lint
119+
120+
# Run type checking
121+
pnpm type:check
122+
123+
# Run all checks and build (recommended before commit)
124+
pnpm commit:check
125+
```
126+
127+
## Development Guidelines
128+
129+
### Code Style
130+
131+
We use [Biome](https://biomejs.dev/) for linting and formatting. Our code style is enforced by the configuration in the repository.
132+
133+
### Testing
134+
135+
- Write tests for new features and bug fixes
136+
- Maintain or improve test coverage
137+
- Run tests locally before submitting a PR
138+
139+
### Documentation
140+
141+
- Update documentation to reflect any changes
142+
- Use clear and concise language
143+
- Follow the existing documentation style
144+
145+
## Getting Help
146+
147+
If you need help with the contribution process or have questions, feel free to:
148+
149+
- Comment on the relevant issue
150+
- Ask questions in pull requests
151+
- Reach out to the maintainers
152+
153+
---
154+
155+
Thank you for contributing to PushForge! Your efforts help make this project better for everyone.

README.md

Lines changed: 133 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,133 @@
1-
# pushforge
1+
# PushForge 🚀
2+
3+
<div align="center">
4+
5+
![PushForge Logo](images/pushforge_logo.png)
6+
7+
**Modern, Cross-Platform Web Push Notifications**
8+
9+
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
10+
[![Node Version](https://img.shields.io/badge/node-%3E%3D16.0.0-brightgreen)](https://nodejs.org/)
11+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
12+
13+
</div>
14+
15+
## What is PushForge?
16+
17+
PushForge is a comprehensive toolkit for implementing Web Push Notifications in modern web applications. It handles the complex parts of push notifications so you can focus on building great user experiences.
18+
19+
**Zero dependencies. Cross-platform. TypeScript-first.**
20+
21+
### Features
22+
23+
- 🔐 Compliant VAPID authentication
24+
- 📦 Streamlined payload encryption
25+
- 🌐 Works everywhere: Node.js, Browsers, Deno, Bun, Cloudflare Workers
26+
- 🧩 Modular architecture for flexible implementation
27+
- 🛠️ Built with TypeScript for robust type safety
28+
29+
## Packages
30+
31+
| Package | Description | Path |
32+
| -------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------- |
33+
| [@pushforge/builder](packages/builder) | Core library for building push notification requests with proper VAPID encryption | [`packages/builder/`](packages/builder) |
34+
35+
_More packages coming soon!_
36+
37+
## Quick Start
38+
39+
```bash
40+
# Install the core package
41+
npm install @pushforge/builder
42+
43+
# Generate VAPID keys for push authentication
44+
npx @pushforge/builder generate-vapid-keys
45+
```
46+
47+
Check out the complete documentation in each package's README for detailed usage examples.
48+
49+
## Project Structure
50+
51+
```
52+
pushforge/
53+
├── packages/
54+
│ └── builder/ # Core push notification builder
55+
│ ├── lib/ # Source code
56+
│ ├── examples/ # Usage examples (coming soon)
57+
│ └── README.md # Package documentation
58+
└── README.md # This file
59+
```
60+
61+
## Requirements
62+
63+
- **Node.js**: v16.0.0 or higher (for WebCrypto API support)
64+
- **NPM**, **Yarn**, or **pnpm** for package management
65+
66+
## Development Setup
67+
68+
1. Clone the repository:
69+
70+
```bash
71+
git clone https://github.com/draphy/pushforge.git
72+
cd pushforge
73+
```
74+
75+
2. Install dependencies:
76+
77+
```bash
78+
pnpm install
79+
```
80+
81+
3. Build packages:
82+
83+
```bash
84+
pnpm build
85+
```
86+
87+
4. Available Commands:
88+
89+
```bash
90+
# Format and lint code
91+
pnpm biome:format # Format code with Biome
92+
pnpm biome:lint # Lint code with Biome
93+
pnpm biome:check # Check code with Biome
94+
pnpm biome:fix # Fix issues automatically with Biome
95+
96+
# Type checking
97+
pnpm type:check # Run TypeScript type checking
98+
99+
# Commit checks (run before committing)
100+
pnpm commit:check # Run formatting, type checking and build
101+
```
102+
103+
## Contributing
104+
105+
Contributions are always welcome! We follow a structured workflow for contributions - see our [Contributing Guidelines](CONTRIBUTING.md) for details.
106+
107+
Whether you want to:
108+
109+
- 🐛 Report a bug
110+
- 💡 Suggest new features
111+
- 🧪 Improve tests
112+
- 📚 Enhance documentation
113+
- 💻 Submit a PR
114+
115+
We appreciate your help making PushForge better for everyone.
116+
117+
## Reporting Issues
118+
119+
Found a bug or have a feature request? Please [open an issue](https://github.com/draphy/pushforge/issues/new) and provide as much detail as possible.
120+
121+
## Sponsorship
122+
123+
If you find PushForge valuable, consider [sponsoring the project](https://github.com/sponsors/draphy). Your sponsorship helps maintain and improve the library.
124+
125+
## License
126+
127+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
128+
129+
---
130+
131+
<div align="center">
132+
<sub>Built with ❤️ by <a href="https://github.com/draphy">David Raphi</a></sub>
133+
</div>

images/pushforge_logo.png

999 KB
Loading

0 commit comments

Comments
 (0)