Skip to content

Commit 2408afb

Browse files
committed
chore(release): v0.1.0
0 parents  commit 2408afb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+25871
-0
lines changed

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Maven
2+
target/
3+
pom.xml.tag
4+
pom.xml.releaseBackup
5+
pom.xml.versionsBackup
6+
pom.xml.next
7+
release.properties
8+
dependency-reduced-pom.xml
9+
buildNumber.properties
10+
.mvn/timing.properties
11+
.mvn/wrapper/maven-wrapper.jar
12+
13+
# Java
14+
*.class
15+
*.log
16+
*.jar
17+
*.war
18+
*.nar
19+
*.ear
20+
*.zip
21+
*.tar.gz
22+
*.rar
23+
hs_err_pid*
24+
replay_pid*
25+
26+
# IDE
27+
.idea/
28+
*.iml
29+
*.iws
30+
*.ipr
31+
.classpath
32+
.project
33+
.settings/
34+
.vscode/
35+
*.sublime-workspace
36+
.DS_Store
37+
38+
# Misc
39+
*.swp
40+
*~
41+
.gradle
42+
build/
43+
bin/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Jazzy Framework
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
# Jazzy Framework
2+
3+
Jazzy is a lightweight web framework for Java. It provides a minimal and easy-to-understand API for developing fast web applications.
4+
5+
## Features
6+
7+
- Simple and intuitive API
8+
- Routing system with HTTP method support (GET, POST, PUT, DELETE, PATCH)
9+
- URL path parameter support
10+
- Automatic parameter mapping
11+
- Simple metrics collection and reporting
12+
13+
## Quick Start
14+
15+
To develop a web application with Jazzy, you can follow this example code:
16+
17+
```java
18+
// App.java
19+
package com.example;
20+
21+
import jazzyframework.core.Config;
22+
import jazzyframework.core.Server;
23+
import jazzyframework.routing.Router;
24+
25+
public class App {
26+
public static void main(String[] args) {
27+
// Create configuration
28+
Config config = new Config();
29+
config.setEnableMetrics(true); // "/metrics" endpoint is automatically added
30+
config.setServerPort(8088);
31+
32+
// Create router
33+
Router router = new Router();
34+
35+
// Define routes
36+
router.GET("/user/{id}", "getUserById", UserController.class);
37+
router.POST("/user/{id}", "updateUser", UserController.class);
38+
router.GET("/users", "getAllUsers", UserController.class);
39+
router.DELETE("/user/{id}", "deleteUser", UserController.class);
40+
router.PUT("/user/{id}", "putUser", UserController.class);
41+
42+
// Start the server
43+
Server server = new Server(router, config);
44+
server.start(config.getServerPort());
45+
}
46+
}
47+
48+
// UserController.java
49+
package com.example;
50+
51+
public class UserController {
52+
// Method with path parameter
53+
public String getUserById(String id) {
54+
return "User ID: " + id;
55+
}
56+
57+
// Method without parameters
58+
public String getAllUsers() {
59+
return "All users";
60+
}
61+
62+
// Method with path parameter and request body
63+
public String updateUser(String id, String requestBody) {
64+
return "Updated user " + id + " with data: " + requestBody;
65+
}
66+
67+
// Method for handling DELETE requests
68+
public String deleteUser(String id) {
69+
return "Deleted user " + id;
70+
}
71+
72+
// Method for handling PUT requests
73+
public String putUser(String id, String requestBody) {
74+
return "Updated user " + id + " with data: " + requestBody;
75+
}
76+
}
77+
```
78+
79+
For a more detailed example, check the `src/main/java/examples/basic` directory.
80+
81+
## Development
82+
83+
Jazzy is developed with Maven. After cloning the project, you can use the following commands:
84+
85+
```bash
86+
# Install dependencies and build the project
87+
mvn clean install
88+
89+
# Run tests
90+
mvn test
91+
92+
# Run the example application
93+
mvn exec:java -Dexec.mainClass="examples.basic.App"
94+
```
95+
96+
## Project Structure
97+
98+
- `core/`: Core framework components
99+
- `Server.java`: HTTP server
100+
- `RequestHandler.java`: HTTP request processor
101+
- `Config.java`: Configuration management
102+
- `Metrics.java`: Performance metrics
103+
- `routing/`: Routing system
104+
- `Router.java`: Route management
105+
- `Route.java`: Route data structure
106+
- `controllers/`: System controllers
107+
- `MetricsController.java`: Metrics reporting
108+
- `examples/`: Example applications
109+
- `basic/`: A simple web API example
110+
111+
## Tests
112+
113+
Unit tests have been written to ensure the reliability of the framework. Test coverage includes:
114+
115+
- `RouterTest`: Tests for adding routes, finding routes, and path parameter operations
116+
- `RouteTest`: Tests for the route data structure
117+
- `MetricsTest`: Tests for metric counters and calculations
118+
- `MetricsControllerTest`: Tests for the metrics controller
119+
120+
When adding new features or modifying existing code, it's important to update existing tests or add new tests to maintain the stability of the framework.
121+
122+
## Vision and Roadmap
123+
124+
Jazzy aims to simplify Java web development with a low learning curve, inspired by the elegance and developer-friendliness of Laravel in the PHP world. Our mission is to create a framework that enables developers to quickly build production-ready applications without the typical complexity associated with Java web frameworks.
125+
126+
We believe Java development doesn't have to be verbose or complicated. By bringing Laravel-like simplicity and expressiveness to Java, we want to make web development more accessible and enjoyable for Java developers.
127+
128+
Key principles:
129+
- Simplicity over complexity
130+
- Convention over configuration
131+
- Rapid development without sacrificing performance
132+
- Low learning curve for developers new to Java or web development
133+
134+
## Future Features
135+
136+
### Core Improvements
137+
- JSON support with automatic serialization/deserialization
138+
- Simple template engine
139+
- Middleware system
140+
- Form validation
141+
- Database integration with simple ORM
142+
143+
### Developer Experience
144+
- Centralized routing configuration (similar to Laravel's routes.php)
145+
- Authentication system with easy JWT integration
146+
- Simple project setup and scaffolding
147+
- Comprehensive documentation with examples
148+
149+
## Contributing
150+
151+
**Jazzy is actively maintained and we welcome contributions of any size!**
152+
153+
We believe that open source thrives with community involvement, and we appreciate all types of contributions, whether you're fixing a typo, improving documentation, adding a new feature, or reporting a bug.
154+
155+
### Ways to Contribute
156+
157+
- **Code Contributions**: New features, bug fixes, performance improvements
158+
- **Documentation**: Improving README, adding examples, writing tutorials
159+
- **Testing**: Adding new tests, improving existing tests
160+
- **Feedback**: Reporting bugs, suggesting features
161+
- **Spreading the Word**: Telling others about Jazzy
162+
163+
### Getting Started
164+
165+
1. Fork the project
166+
2. Clone your fork (`git clone https://github.com/yourusername/jazzy.git`)
167+
3. Create a feature branch (`git checkout -b feature/amazing-feature`)
168+
4. Make your changes (don't forget to add tests if applicable)
169+
5. Run tests to make sure everything works (`mvn test`)
170+
6. Commit your changes (`git commit -m 'Add some amazing feature'`)
171+
7. Push to the branch (`git push origin feature/amazing-feature`)
172+
8. Open a Pull Request
173+
174+
### Pull Request Guidelines
175+
176+
- Keep your changes focused on a single issue
177+
- Make sure all tests pass
178+
- Update documentation if needed
179+
- Follow existing code style
180+
181+
No contribution is too small, and we're happy to help newcomers get started!
182+
183+
## License
184+
185+
MIT License

docs-site/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs-site/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

0 commit comments

Comments
 (0)