Skip to content

Commit

Permalink
feat: add architecture overview
Browse files Browse the repository at this point in the history
  • Loading branch information
0xshora committed Nov 28, 2023
1 parent 1798fa3 commit 8f4b10d
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 1 deletion.
52 changes: 51 additions & 1 deletion src/architecture/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,54 @@ Here, we describe PixeLAW's architecture.
We built core layer. Builders can create their own application by interacting with core layer.
![overview](../images/overview.jpg)

## Core Components
## Core Layer
To understand core layer, we delve into components and systems for that.

### Core Components
Here are the components.

#### For System Properties
- `x`: u64
- `y`: u64
- `created_at`: u64
- `updated_at`: u64

#### For User-changeable Properties
- `app`: ContractAddress
- `color`: u32
- `owener`: ContractAddress
- `text`: felt252
- `timestamp`: u64
- `action`: felt252

![Components](../images/CoreComponents.jpg)


### Core Systems
These systems interact with core components.
- `init`: Initialize the PixeLAW action model
- `update_permissions`: Grant permissions to a system by the caller
- `update_app`: Updates the name of an app in the registry
- `has_write_access`: Check the access for writing
- `shedule_queue`: Shedule the process for queue
- `process_queue`: Execute the process in queue
- `update_pixel`: Update pixel information
- `get_player_address`: Get the address
- `get_system_address`: Get the address
- `new_app`: Register an app

## Applications on PixeLAW
There are already some applications top of core layer for example.

### Paint pixel
By utilizing core systems, we can create our own pixel art game.
![Paint](../images/PaintSystems.jpg)

### Sanke Game
For snake game, the queue system is important.
![Snake](../images/SnakeSystems.jpg)


## Queue System
We use queue system to execute stacked processes.
![Queue](../images/queue.jpg)
Binary file added src/images/CoreComponents.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/CoreSystems.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/PaintSystems.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/SnakeSystems.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/overview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/queue.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/update_pixel.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8f4b10d

Please sign in to comment.