Skip to content
This repository was archived by the owner on Aug 9, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
247dcbd
added a small disclaimer for JS users
ZakaHaceCosas Jun 6, 2024
c0e6191
correct header organisation
ZakaHaceCosas Jun 6, 2024
85b8929
fix
ZakaHaceCosas Jun 6, 2024
36dedc4
put it into a block
ZakaHaceCosas Jun 6, 2024
a27e8ee
logos made by me :D
ZakaHaceCosas Jun 6, 2024
e1c52fa
maybe like this?
ZakaHaceCosas Jun 6, 2024
aeb5a90
maybe this way
ZakaHaceCosas Jun 6, 2024
09f68bc
MAYBE THIS WAY?
ZakaHaceCosas Jun 6, 2024
7e5bd6b
forget it, will find another way
ZakaHaceCosas Jun 6, 2024
edb95b7
fix a typo
ZakaHaceCosas Jun 6, 2024
6b9ac50
better formatting and that kind of stuff
ZakaHaceCosas Jun 6, 2024
1a6cf9c
better readmes
ZakaHaceCosas Jun 7, 2024
d7cdfac
Merge branch 'face-hh:master' into master
ZakaHaceCosas Jun 7, 2024
ea87aae
started works on 1.3.0
ZakaHaceCosas Jun 7, 2024
b7a49b0
progress (not done with lua yet but commit because yes)
ZakaHaceCosas Jun 7, 2024
1bd7518
cool
ZakaHaceCosas Jun 7, 2024
6c550f2
Merge branch 'face-hh:master' into master
ZakaHaceCosas Jun 21, 2024
836c948
version bump
ZakaHaceCosas Jun 21, 2024
653668c
Fix misusage of underscores instead of dashes.
ZakaHaceCosas Jun 22, 2024
75efc8a
Fixed typos with set_content function
ZakaHaceCosas Jun 22, 2024
ec67c49
removed some misinformation (based on issue BUG: Misinformation in r…
ZakaHaceCosas Jun 22, 2024
54f0179
small fix
ZakaHaceCosas Jun 26, 2024
d7b431d
Fix an error with GET /domains
ZakaHaceCosas Jun 28, 2024
94bbfb3
fixed typos
ZakaHaceCosas Jun 28, 2024
a4c07c0
better browser table and custom dns
ZakaHaceCosas Jun 29, 2024
5b04516
sligh clarification about DNS custom
ZakaHaceCosas Jun 29, 2024
57fe0a6
Fix forgotten button tag
ZakaHaceCosas Jun 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,8 +25,9 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Arch Linux on Wayland]
- Version [e.g. 1.2.2]

- OS: [e.g. Arch Linux on Wayland]
- Version [e.g. 1.2.2]

**Additional context**
Add any other context about the problem here.
127 changes: 84 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
# Bussin Web X

An alternative to the World Wide Web (`http(s)://`), with:
- its own **custom browser** written in Rust with [GTK](https://gtk.org/),

- its own **custom browser** written in [Rust](https://www.rust-lang.org/) with [GTK](https://gtk.org/),
- custom HTML, CSS and ***Lua*** engine (yup, **no javascript! 🎉**),
- custom **DNS** allowing Top-Level domains such as `rizz`, `sigma`, `lol`, `dev`, etc,
- and **search engine** at `buss://dingle.it`.

![Preview of buss://register.it, the frontend for registering domains](.github_assets/image.png)

# File structure
- `/napture` - The source code for the **browser** Bussin Napture, used to view buss:// sites.
- `/dns` - The source code for the **DNS** (Domain Name System), used for the API at `https://api.buss.lol`
- `/dingle` - The source code for the official **search engine** (API) of Web X. For the frontend, check [dingle frontend repo](https://github.com/face-hh/dingle-frontend)
## File structure

- `/docs` - The source MarkDown for the **official documentation website**, currently hosted at [https://facedev.gitbook.io/bussin-web-x-how-to-make-a-website](https://facedev.gitbook.io/bussin-web-x-how-to-make-a-website). Has both user manuals for the official browser & guides and docs for developers who want to create websites for Web X.
- `/napture` - The source code for the **browser**, "Bussin Napture", used to view buss:// sites.
- `/dns` - The source code for the **DNS** (Domain Name System), used for the API at `https://api.buss.lol`.
- `/dingle` - The source code for the official **search engine** of Web X. This is for the API only, for the frontend go check the [Dingle frontend repo](https://github.com/face-hh/dingle-frontend)
- [registrar](https://github.com/face-hh/webx-registrar) - The source code for `buss://register.it`, frontend for `https://api.buss.lol` made for Bussin Web X. This can also serve as an example for how buss:// sites are made.

# Download and Install
## Arch Linux
- `yay -S napture`, it's available on AUR.
## Nix[OS]
## Documentation

> [!NOTE]
> Note: This is just a summary, full docs can be found at the [WebX official documentation](https://facedev.gitbook.io/bussin-web-x-how-to-make-a-website)

### Download and Install

#### Install for Linux

- For now, you have to download [Rust](https://www.rust-lang.org/tools/install). Then, you just need to open `install-linux.sh` in the `napture` folder as an executable (if you can't execute it, first do `sudo chmod +x ./install-linux.sh`, then you should be able to install).

#### Install for Arch Linux

- Run `yay -S napture`, it's available on AUR.

#### Install for Nix[OS]

**Flakes**: The repository provides a flake which exposes an overlay providing the webx package, so you could just add the input in your flake.nix file
- **Flakes**: The repository provides a flake which exposes an overlay providing the webx package, so you could just add the input in your flake.nix file

```nix
{
Expand Down Expand Up @@ -51,20 +66,24 @@ home.packages = with pkgs; [

Then you could just launch it using `webx` in your terminal.

## Linux
- For now, you have to download [Rust](https://www.rust-lang.org/tools/install). Then, you just need to open `install-linux.sh` in the `napture` folder as an executable (if you can't execute it, first do `sudo chmod +x ./install-linux.sh`, then you should be able to install).
## macOS
#### Install for macOS

- For now, you have to download [Rust](https://www.rust-lang.org/tools/install) and [Homebrew](https://brew.sh). Then, you just need to open `install-macos.sh` in the `napture` folder as an executable (if you can't execute it, first do `chmod +x ./install-macos.sh`, then you should be able to install).
## Windows

#### Install for Windows

- Install the executable from the release tab. It's a self-extractor with WinRAR because it has a lot of DLLs.

# Download and Compile
## Linux
Install [Rust](https://www.rust-lang.org/tools/install) if you haven't already.
It should work by default, but if you're getting errors such as "missing PC files", you should Google it. Most likely you just have to install a library
### Download and Compile

#### Compile for Linux

- Install [Rust](https://www.rust-lang.org/tools/install) if you haven't already. It should work by default, but if you're getting errors such as "missing PC files", you should Google it. Most likely you just have to install a library

#### Compile for Windows

> Welcome to Gaming OS 🙂

## Windows
Welcome to Gaming OS 🙂
1. Download [Rust](https://www.rust-lang.org/tools/install)
2. Download GNU target: `rustup toolchain install stable-gnu && rustup default stable-gnu`
3. Download [MSYS32](https://www.msys2.org/)
Expand All @@ -75,19 +94,26 @@ Welcome to Gaming OS 🙂
8. Select `Path` -> Click on `Edit` -> Add the following three entries: `C:\msys64\mingw64\include`, `C:\msys64\mingw64\bin`, and `C:\msys64\mingw64\lib`.
9. Open a terminal in the folder with `napture/`, run `cargo run`.

## MacOS (Apple Silicon)
#### Compile for macOS (Apple Silicon)

1. Install [Rust](https://www.rust-lang.org/tools/install)
2. Install [Homebrew](https://brew.sh/)
3. Install PKG_CONFIG_PATH and ensure it's set in your path
3. Clone the repo

```bash
git clone https://github.com/face-hh/webx
```

4. Install PKG_CONFIG_PATH and ensure it's set in your path

```bash
brew install pkg-config
which pkg-config
```

3.1. Should return something like `/opt/homebrew/bin/pkg-config`. If it doesn't, add it to your path.
4.1. Should return something like `/opt/homebrew/bin/pkg-config`. If it doesn't, add it to your path.

4. Install GTK and Necessary Libraries
5. Install GTK and the necessary Libraries

```bash
brew install glib
Expand All @@ -109,7 +135,7 @@ brew --prefix libadwaita
brew --prefix lua@5.4
```

4.1 Validate if the libraries are installed adequately and set in PKG_CONFIG_PATH, command below should return the path to the libraries without any errors.
5.1 Validate if the libraries are installed adequately and set in PKG_CONFIG_PATH, command below should return the path to the libraries without any errors.

```bash
pkg-config --libs --cflags glib-2.0
Expand All @@ -122,7 +148,7 @@ pkg-config --libs --cflags libadwaita-1
pkg-config --libs --cflags lua-5.4
```

5. Run `cargo run` in the `napture/` directory.
6. Run `cargo run` in the `napture/` directory.

```bash
cd napture
Expand All @@ -132,10 +158,12 @@ cargo build
cargo run
```

# Register website
Please follow [How to code a Buss site](https://facedev.gitbook.io/bussin-web-x-how-to-make-a-website/) for a better visual guide.
## Website registering

> [!NOTE]
> Again: This is just a summary, full docs can be found at the [WebX official documentation](https://facedev.gitbook.io/bussin-web-x-how-to-make-a-website). **Please head to the docs for a better and more visual guide.**

So you wish to publish a website to Web X? Great! Let's go through the rules:
So, you wish to publish a website to Web X? Great! Let's go through the rules:

1. If your website contains Not Safe For Work material of any kind, it will be removed.
2. If your website contains frequent racial slurs, references made in bad faith to tragic events, racism towards other races, or anything of that kind, it will be removed.
Expand All @@ -148,39 +176,50 @@ So you wish to publish a website to Web X? Great! Let's go through the rules:
9. If your website is involved in fradulent activities, scams, or deceptive practices, it will be removed.
10. If your website contains content that encourages harmful behavior, including self-harm, suicide, substance abuse, or dangerous challanges, it will be removed.

By publishing content to this platform ("Bussin Napture"/"Bussin Web X"), you agree to comply with all rules and regulations set forth by the administrators. The administrators reserve the right to interpret and enforce these rules at their discretion. To report websites that are not following the listed rules, please contact `FaceDev` on either [Twitter](https://twitter.com/facedevstuff) or [Discord](https://discord.gg/cNwWvdWj42).
**By publishing content to this platform ("Bussin Napture" / "Bussin Web X"), you agree to comply with all rules and regulations set forth by the administrators. The administrators reserve the right to interpret and enforce these rules at their discretion. To report websites that are not following the listed rules, please contact `FaceDev` on either [Twitter](https://twitter.com/facedevstuff) or [Discord](https://discord.gg/cNwWvdWj42).**

Now, to register a website, navigate to `buss://register.it` **through Bussin Napture**.

You will see this interface.
![Preview of buss://register.it, the frontend for registering domains](.github_assets/image.png)

What you need is the **Publish** section.

- for the domain name, choose whatever you want. (example: `duckduckgo`)
- for the TLD, choose one displayed above the `Result will appear...` label. (example: `rizz`)
- for the IP, you can either use:
- an IP that serves `/index.html` on port 80
- a GitHub repository that has `index.html`, **outside any folder**. (example: [registrar](https://github.com/face-hh/webx-registrar)), ***with the `main` default branch***.
- an IP that serves `/index.html` on port 80
- a GitHub repository that has `index.html`, **outside any folder**. (example: [registrar](https://github.com/face-hh/webx-registrar)), ***with the `main` default branch***.

Don't worry! The IP doesn't have to be valid, allowing you to register a domain and save it for later!

Don't worry! The IP doesn't have to be valid, and you can save the domain for later!
**WARNING**: After creating the domain, you'll be shown a **secret key**. Please make sure to save it as you will need it to Update/Delete your domain. With your secret key you can, for example, edit the IP of your website.

**WARNING**: After creating the domain, you'll be shown a **secret key**. Please make sure to save it as you will need it to Update/Delete your domain.
## Running a website locally

# Run website locally
Bussin Napture fetches `index.html` at whatever path you give it. For example, if you enter `http://localhost:3000`, Napture will fetch `http://localhost:3000/index.html`. From the index.html, if you have further `<link>` or `<script>` imports, they will be fetched at `http://localhost:3000/file.(css|lua)`.

1. To locally test a website, you can use something like [Python](https://www.python.org/):

```bash
python -m http.server 3000
```

2. CLI support with `./napture file:///home/path/to/folder`.
3. Enter `file:///home/path/to/folder` in the search bar.

# HTML guide
## HTML++ guide

> "HTML++" = WebX HTML

The supported tags are: `head`, `title`, `link`, `meta`, `script`, `h1`-`h6`, `div`, `p`, `ul`, `ol`, `li`, `div`, `button`, `hr`, `img`, `input`, `textarea`, `button`, `select`, `option`. Keep in mind their syntax may be different if you're already familiar with HTML5 (i.e. `link` is used for the tab icon). Please check [registrar](https://github.com/face-hh/webx-registrar) or `/napture/test/index.html` for examples.

# CSS guide
## CSS 3.25 guide

> "CSS 3.25" = WebX CSS

The supported properties are:

- `border-color`
- `border-width`
- `border-style`
Expand Down Expand Up @@ -209,8 +248,12 @@ The supported properties are:

Properties whose value type wasn't specified are either measured in `px`, or are colors (`#fff`, `red`, etc.)

# Lua guide
For those coming from the traditional web...
## Lua guide

> "Lua" = WebX JS = Luau

In a nutshell for those coming from the traditional web:

```diff
- 1. const test = document.querySelector(".classExample");
- 2. test.textContent = "abc";
Expand All @@ -226,8 +269,6 @@ For those coming from the traditional web...
+ 6. test.on_submit(function())
```

I believe you'd get a better understand if you explored the [registrar](https://github.com/face-hh/webx-registrar) repository's `script.lua`.

NOTE: Bussin Napture doesn't support `buss://` redirects yet. They will be added in the official release.
You'll probably get a better understanding if you explore the [registrar](https://github.com/face-hh/webx-registrar) repository's `script.lua`.

Made by FaceDev with pure utter hatred and undesire :D
*Made by FaceDev with pure utter hatred and undesire :D*
2 changes: 1 addition & 1 deletion dingle/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Dingle.it

This folder contains the source code for the API behind buss://dingle.it, the official search engine of Bussin Web X.
This folder contains the source code for the API behind buss://dingle.it, the official search engine of Bussin Web X.
58 changes: 37 additions & 21 deletions dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,21 @@ Returns a simple message with the available endpoints and rate limits.

**Response:**

```
Hello, world! The available endpoints are:
GET /domains,
GET /domain/{name}/{tld},
POST /domain,
PUT /domain/{key},
DELETE /domain/{key},
GET /tlds.
Ratelimits are as follows: 10 requests per 60s.
```txt
webxDNS v0.3.0!

The available endpoints are:

- [GET] /domains
- [GET] /domain/{name}/{tld}
- [POST] /domain
- [PUT] /domain/{key}
- [DELETE] /domain/{key}
- [GET] /tlds

Ratelimits are as follows: 5 requests per 10 minutes on `[POST] /domain`.

Code link: https://github.com/face-hh/webx/tree/master/dns
```

### POST /domain
Expand All @@ -43,25 +49,28 @@ Creates a new domain entry.
- Headers:
- `Content-Type: application/json`
- Body:

```json
{
"tld": "example_tld",
"ip": "example_ip",
"name": "example_name"
"tld": "example_tld",
"ip": "example_ip",
"name": "example_name"
}
```

**Response:**

- `200 OK` if the domain is successfully created.

```json
{
"tld": "example_tld",
"ip": "example_ip",
"name": "example_name",
"secret_key": "generated_secret_key"
"tld": "example_tld",
"ip": "example_ip",
"name": "example_name",
"secret_key": "generated_secret_key"
}
```

- `400 Bad Request` if the request body is invalid, the TLD is non-existent, the name is too long (24 chars), or the domain is offensive.
- `409 Conflict` if the domain already exists.

Expand All @@ -80,13 +89,15 @@ Fetches a domain entry by name and TLD.
**Response:**

- `200 OK` if the domain is found.

```json
{
"tld": "example_tld",
"name": "example_name",
"ip": "example_ip"
"tld": "example_tld",
"name": "example_name",
"ip": "example_ip"
}
```

- `404 Not Found` if the domain is not found.

### PUT /domain/:key
Expand All @@ -102,20 +113,23 @@ Updates the IP address of a domain entry using its secret key.
- Headers:
- `Content-Type: application/json`
- Body:

```json
{
"ip": "new_ip_address"
"ip": "new_ip_address"
}
```

**Response:**

- `200 OK` if the IP address is successfully updated.

```json
{
"ip": "new_ip_address"
"ip": "new_ip_address"
}
```

- `404 Not Found` if the domain is not found.

### DELETE /domain/:key
Expand Down Expand Up @@ -146,6 +160,7 @@ Fetches all domain entries.
**Response:**

- `200 OK` with a list of domains.

```json
[
{
Expand All @@ -169,6 +184,7 @@ Fetches the list of allowed top-level domains.
**Response:**

- `200 OK` with a list of TLDs.

```json
["example_tld1", "example_tld2", ...]
```
Expand Down
Loading