Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

whizzes/playa

Repository files navigation

🏖️

playa

Decentralized Social Platform powered by Rust and Whizzes Contributors

Discord Build Clippy Formatter

Collab Strategy

Playa is collaborative project for novice-to-intermediate Rust (backend) and JS/TS (frontend) web developers. We’re learning-by-doing together, in the making of a community platform modeled after the likes of Discord (chat) and Discourse (forum).

The project leader and default mentor for new contributors is @EstebanBorai. New mentors and mentees alike are always welcome!

Development

Requirements

Getting Started

# install just command runner
cargo install just

# clone this repository
git clone https://github.com/whizzes/playa.git


# step into repository directory
cd ./playa

# open a termital window and spin up Docker Containers
just dev

# create a new terminal window and run database migrations
just prepare

# execute the server (next time you just run this command)
cargo run serve

Note: As of today migrations runs when bootstrapping the server automatically

Software Architecture

Layers

Client traffic is handled by a GraphQL endpoint, domain logic is exposed through services which encapsulate access to the database logic. The CLI solution communicates directly to the services.

softarq

Design

This project takes some inspiration on Domain Driven Design, but does not implements its concepts completely. Concepts like value object, model, repositories and services are present but are not 100% accurate to the original Domain Driven Design architecture.

Modules

The client and server solution is available in this repository.

Directory Description
client Web Front-End, written in SvelteKit & TypeScript
crates/ Contains GraphQL Server Logic, CLI and Domain libraries. Rust is the predominant language.
crates/cli CLI used to manage the Server instance. run database migrations and other developer tasks
crates/core Domain Logic, includes Models, Value Objects, Repositories and Services
crates/server HTTP Server Logic, uses Axum and GraphQL
crates/entities Entities generated from database
crates/migrations Database migrations

Testing

Running E2E Tests

E2E Tests run by default on a different database, this allow us to have a database for development and another for testing, speeding up the development process.

The dedicated E2E Database will be builded along with other containers when running just dev.

You can also execute a single E2E Test by specifying the name of the test function along with the just e2e_test command:

just e2e_test my_super_test_function_name

To run every test just execute:

just e2e_test

Teardown containers using just undev.

Contributors

Esteban Borai
Esteban Borai

💻
Michael Liendo
Michael Liendo

💻
David Arenas
David Arenas

💻
CudiLala
Cudi Lala

💻
Paly Zambrano
Paly Zambrano

💻
Phosphorus-M
Phosphorus-M

💻
David Rodriguez
David Rodríguez

💻

License

Licensed under the MIT License

About

🏖️ Decentralized Social Platform powered by Rust and Whizzes Contributors

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published