Skip to content

Commit 6e17245

Browse files
authored
Merge pull request #123 from ozeanjs/update-docs
Update docs
2 parents eec127b + 0b36274 commit 6e17245

File tree

8 files changed

+17
-23
lines changed

8 files changed

+17
-23
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
<p align="center">
22
<a href="https://ozeanjs.com">
3-
<img src="./docs/src/assets/logo.svg" alt="OzeanJs" width="150">
3+
<img src="./docs/docs/public/logo.svg" alt="OzeanJs" width="150">
44
</a>
55
</p>
66

77
<p align="center">A progressive <a href="https://ozeanjs.com">OzeanJs</a> framework for crafting efficient and scalable server-side applications.</p>
88

9+
<p align="center">
10+
<img src="https://img.shields.io/npm/v/ozean" alt="npm version">
11+
<img src="https://img.shields.io/npm/dm/ozean" alt="npm download">
12+
<img src="https://img.shields.io/badge/bun-compatible-brightgreen" alt="bun compatible">
13+
<img src="https://img.shields.io/github/license/ozeanjs/ozean" alt="License">
14+
</p>
15+
916
# OzeanJs 🌊
1017

1118
Welcome to [**OzeanJs**](https://ozeanjs.com)!
@@ -103,3 +110,11 @@ Hello cat.
103110
That's it! In just 3 simple steps, your first OceanJs project is ready to go. Try opening the project in your favorite editor and start modifying the code in the `src` folder!
104111

105112
Happy coding with OzeanJs!
113+
114+
[npm-url]: https://www.npmjs.com/package/ozean
115+
[npm-version-image]: https://img.shields.io/npm/v/ozean.svg?style=flat
116+
[npm-downloads-image]: https://img.shields.io/npm/dm/ozean.svg?style=flat
117+
[npm-downloads-url]: https://npmcharts.com/compare/ozean?minimal=true
118+
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat
119+
[license-url]: LICENSE
120+
[bun-compatible]: https://img.shields.io/badge/bun-compatible-brightgreen

docs/docs/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export default defineConfig({
107107
{ icon: 'github', link: 'https://github.com/ozeanjs/ozean' },
108108
{ icon: 'npm', link: 'https://www.npmjs.com/package/ozean' },
109109
{ icon: 'discord', link: 'https://discord.gg/rMBc8Snft4' },
110+
{ icon: 'x', link: 'https://x.com/ozeanjs' },
110111
],
111112

112113
search: {

docs/docs/cli/cli-new.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ ozean n <project-name>
2020

2121
- **`<project-name>`** (required): The name of the folder and the project you want to create.
2222

23-
---
24-
2523
## What the `new` command does
2624

2725
When you run `ozean new my-awesome-app`, the CLI automatically performs new project.

docs/docs/intro/core-concepts.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ The main components of an OceanJs application consist of three key parts:
88
- **Providers**: Classes that handle Business Logic (mostly Services).
99
- **Controllers**: Classes that receive HTTP Requests and send back Responses.
1010

11-
---
12-
1311
## 1. Modules: The Foundation of an Application
1412

1513
Modules are the core of code organization in OceanJs. Every application has at least one module, the Root Module (e.g., `AppModule`). We use the `@Module()` decorator to define a module.
@@ -34,8 +32,6 @@ import { UsersService } from './users.service';
3432
export class UsersModule {}
3533
```
3634

37-
---
38-
3935
## 2. Providers and Dependency Injection (DI)
4036

4137
Providers are classes designed to "provide" various logic and can be "injected" (passed) into other parts of the application, such as Services, Repositories, Factories, or Helpers. We use the `@Injectable()` decorator to mark a class as a Provider.
@@ -68,8 +64,6 @@ export class UsersController {
6864
}
6965
```
7066

71-
---
72-
7367
## 3. Controllers and Request Lifecycle
7468

7569
Controllers are responsible for receiving incoming HTTP requests, processing them, and returning a response. We use Decorators to define routes and extract data from the request.

docs/docs/intro/quickstart.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ This guide shows the fastest way to create and run your first OzeanJs project us
66

77
Ensure you have **Bun** installed on your machine.
88

9-
---
10-
119
### Step 1: Create a New Project with the CLI
1210

1311
You don't need to install our CLI beforehand. You can use the `bunx` command to download and run it immediately.
@@ -29,8 +27,6 @@ Once the command is finished, navigate into your project folder:
2927
cd my-awesome-app
3028
```
3129

32-
---
33-
3430
### Step 2: Run the Development Server
3531

3632
Run your application in development mode with the command:
@@ -43,8 +39,6 @@ bun run index
4339

4440
You should see a message in your terminal indicating that your application is running on `http://localhost:3000`.
4541

46-
---
47-
4842
### Step 3: Test the Application
4943

5044
Open another terminal and use `curl` to test if the server is working correctly:

docs/docs/overview/first-steps.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ This document will guide you through installing and starting an OceanJs project.
66

77
Ensure you have **Bun** installed on your machine.
88

9-
---
10-
119
## Method 1: Installation via Ozean CLI (Recommended)
1210

1311
This is the **fastest and easiest** way to start your OceanJs project, as the CLI handles all the necessary basic setup automatically.
@@ -37,8 +35,6 @@ bun run index
3735

3836
Your application will start running at `http://localhost:3000` immediately!
3937

40-
---
41-
4238
## Method 2: Manual Installation
4339

4440
This method is suitable for those who want to control every aspect of the setup themselves from the beginning.

docs/docs/overview/pipes.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ We use the `@UsePipes()` decorator to "attach" the desired Pipe to the Route Han
1515

1616
OzeanJs comes with a built-in `ValidationPipe`, a powerful pipe that works with the `class-validator` and `class-transformer` libraries to automatically validate and transform data from the request body according to a specified DTO (Data Transfer Object).
1717

18-
---
19-
2018
## Usage Example: Input Validation
2119

2220
Here is a complete example of using `ValidationPipe` to validate data for creating a new user.

docs/docs/overview/providers.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ The `@Injectable()` decorator marks a class as a provider that can be managed by
1010

1111
Dependency Injection is a design pattern where the framework takes control of creating and delivering dependencies (like services) to classes that need them (like controllers). In OzeanJs, this is done through constructor injection: you simply declare the dependency you need as a constructor parameter, along with its type. The framework handles the rest.
1212

13-
---
14-
1513
## Complete Example: `Users` Feature
1614

1715
Here is a complete example that demonstrates how Controllers, Providers, and Modules work together.

0 commit comments

Comments
 (0)