Skip to content

Commit

Permalink
chore: rename to townhall
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanBorai committed Jun 2, 2024
1 parent 8f4ad07 commit 5e0897a
Show file tree
Hide file tree
Showing 32 changed files with 88 additions and 88 deletions.
14 changes: 7 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
CORS_ALLOW_ORIGIN='*'
DATABASE_URL='postgresql://playa:playa@localhost:5432/playa'
JWT_SECRET='playa'
MINIO_ROOT_USER='minio_playa'
MINIO_ROOT_PASSWORD='minio_playa'
DATABASE_URL='postgresql://townhall:townhall@localhost:5432/townhall'
JWT_SECRET='townhall'
MINIO_ROOT_USER='minio_townhall'
MINIO_ROOT_PASSWORD='minio_townhall'
MINIO_ACCESS_KEY='AKIAIOSFODNN7EXAMPLE'
MINIO_SECRET_KEY='wJalrXUtnFEMIKK7MDENGKKPxRfiCYEXAMPLEKEY'
PORT=7878
RUST_LOG='info'
POSTGRES_USER='playa'
POSTGRES_PASSWORD='playa'
POSTGRES_DB='playa'
POSTGRES_USER='townhall'
POSTGRES_PASSWORD='townhall'
POSTGRES_DB='townhall'
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">
<span style="font-size: 64px;">🏖️</span>
<h1 align="center">playa</h1>
<h1 align="center">townhall</h1>
<p align="center">
Decentralized Social Platform powered by Rust and Whizzes Contributors
</p>
Expand All @@ -9,15 +9,15 @@
<div align="center">

[![Discord](https://img.shields.io/discord/1011702194925490186?color=blue&label=discord&logo=discord)](https://discord.gg/yde6mcgs2C)
![Build](https://github.com/whizzes/playa/workflows/build/badge.svg)
![Clippy](https://github.com/whizzes/playa/workflows/clippy/badge.svg)
![Formatter](https://github.com/whizzes/playa/workflows/fmt/badge.svg)
![Build](https://github.com/whizzes/townhall/workflows/build/badge.svg)
![Clippy](https://github.com/whizzes/townhall/workflows/clippy/badge.svg)
![Formatter](https://github.com/whizzes/townhall/workflows/fmt/badge.svg)

</div>

### 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).
townhall 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!

Expand All @@ -36,11 +36,11 @@ The project leader and default mentor for new contributors is @EstebanBorai. New
cargo install just

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


# step into repository directory
cd ./playa
cd ./townhall

# open a termital window and spin up Docker Containers
just dev
Expand All @@ -64,7 +64,7 @@ the services.

<div align="center">

![softarq](https://github.com/whizzes/playa/assets/34756077/86abfb8d-8e96-4e93-9677-4e0864f53da6)
![softarq](https://github.com/whizzes/townhall/assets/34756077/86abfb8d-8e96-4e93-9677-4e0864f53da6)

</div>

Expand Down Expand Up @@ -128,7 +128,7 @@ Teardown containers using `just undev`.
</sub>
</a>
<br />
<a href="https://github.com/whizzes/playa/commits?author=EstebanBorai" title="Code">💻</a>
<a href="https://github.com/whizzes/townhall/commits?author=EstebanBorai" title="Code">💻</a>
</td>
<td align="center" valign="top" width="14.28%">
<a href="https://github.com/Michael-Liendo">
Expand All @@ -139,7 +139,7 @@ Teardown containers using `just undev`.
</sub>
</a>
<br />
<a href="https://github.com/whizzes/playa/commits?author=Michael-Liendo" title="Code">💻</a>
<a href="https://github.com/whizzes/townhall/commits?author=Michael-Liendo" title="Code">💻</a>
</td>
<td align="center" valign="top" width="14.28%">
<a href="https://github.com/Dave136">
Expand All @@ -150,7 +150,7 @@ Teardown containers using `just undev`.
</sub>
</a>
<br />
<a href="https://github.com/whizzes/playa/commits?author=Dave136" title="Code">💻</a>
<a href="https://github.com/whizzes/townhall/commits?author=Dave136" title="Code">💻</a>
</td>
<td align="center" valign="top" width="14.28%">
<a href="https://github.com/CudiLala">
Expand All @@ -161,7 +161,7 @@ Teardown containers using `just undev`.
</sub>
</a>
<br />
<a href="https://github.com/whizzes/playa/commits?author=CudiLala" title="Code">💻</a>
<a href="https://github.com/whizzes/townhall/commits?author=CudiLala" title="Code">💻</a>
</td>
<td align="center" valign="top" width="14.28%">
<a href="https://github.com/PalyZambrano">
Expand All @@ -172,7 +172,7 @@ Teardown containers using `just undev`.
</sub>
</a>
<br />
<a href="https://github.com/whizzes/playa/commits?author=PalyZambrano" title="Code">💻</a>
<a href="https://github.com/whizzes/townhall/commits?author=PalyZambrano" title="Code">💻</a>
</td>
<td align="center" valign="top" width="14.28%">
<a href="https://github.com/Phosphorus-M">
Expand All @@ -183,7 +183,7 @@ Teardown containers using `just undev`.
</sub>
</a>
<br />
<a href="https://github.com/whizzes/playa/commits?author=Phosphorus-M" title="Code">💻</a>
<a href="https://github.com/whizzes/townhall/commits?author=Phosphorus-M" title="Code">💻</a>
</td>
<td align="center" valign="top" width="14.28%">
<a href="https://github.com/dararod">
Expand All @@ -194,7 +194,7 @@ Teardown containers using `just undev`.
</sub>
</a>
<br />
<a href="https://github.com/whizzes/playa/commits?author=dararod" title="Code">💻</a>
<a href="https://github.com/whizzes/townhall/commits?author=dararod" title="Code">💻</a>
</td>
</tr>
</tbody>
Expand Down
14 changes: 7 additions & 7 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<div>
<h1 align="center">playa Frontend</h1>
<h1 align="center">townhall Frontend</h1>
<h4 align="center">
A "Host Yourself" Chat powered by Rust and Whizzes Contributors
</h4>
Expand All @@ -9,9 +9,9 @@
<div align="center">

[![Discord](https://img.shields.io/discord/1011702194925490186?color=blue&label=discord&logo=discord)](https://discord.gg/yde6mcgs2C)
![Build](https://github.com/whizzes/playa/workflows/build/badge.svg)
![Tests](https://github.com/whizzes/playa/workflows/test/badge.svg)
![Lint](https://github.com/whizzes/playa/workflows/lint/badge.svg)
![Build](https://github.com/whizzes/townhall/workflows/build/badge.svg)
![Tests](https://github.com/whizzes/townhall/workflows/test/badge.svg)
![Lint](https://github.com/whizzes/townhall/workflows/lint/badge.svg)

</div>

Expand All @@ -22,18 +22,18 @@
```bash
# clone repository
git clone [email protected]:whizzes/playa.git
git clone [email protected]:whizzes/townhall.git

# cd into the new directory
cd ./playa/client
cd ./townhall/client

# create a `.env` file by copying contents from `.env.example`
cp .env.example .env

# install dependencies
bun i

# optional: make sure playa server is running
# optional: make sure townhall server is running
lsof -i -P -n | grep LISTEN

# run on development mode
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "playa-web",
"name": "townhall-web",
"version": "0.1.0",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion client/src/routes/(app)/components/Navbar/Navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
>
<a href="/" class="flex items-center justify-center">
<span class="text-2xl">🏖️</span>
<strong class="text-xl font-semibold">playa</strong>
<strong class="text-xl font-semibold">townhall</strong>
</a>
<div class="flex gap-4">
{#if $userStore}
Expand Down
6 changes: 3 additions & 3 deletions client/src/routes/(auth)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
</div>
<footer class="footer">
<small>
playa is an MIT Licensed solution
townhall is an MIT Licensed solution
<br />
Contribute to the project on{" "}
<a
href="https://github.com/whizzes/playa"
href="https://github.com/whizzes/townhall"
class="text-blue-600 underline"
target="_blank"
>
Expand All @@ -56,7 +56,7 @@
on
<a
class="underline font-medium"
href="https://unsplash.com/?utm_source=playa&utm_medium=referral"
href="https://unsplash.com/?utm_source=townhall&utm_medium=referral"
>
Unsplash</a
></small
Expand Down
2 changes: 1 addition & 1 deletion client/src/routes/(auth)/signup/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{:else}
<div class="flex flex-col justify-center h-full">
<div class="text-lg py-4">
<h1 class="font-semibold">Welcome to playa!</h1>
<h1 class="font-semibold">Welcome to townhall!</h1>
<span> Create an account to continue </span>
</div>
<form class="flex flex-col py-4 space-y-4" on:submit={handleSubmit}>
Expand Down
4 changes: 2 additions & 2 deletions client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const config: UserConfig = {
sveltekit(),
SvelteKitPWA({
manifest: {
name: "Playa",
short_name: "Playa",
name: "townhall",
short_name: "townhall",
background_color: "#fff",
theme_color: "#448aff",
start_url: "/",
Expand Down
6 changes: 3 additions & 3 deletions crates/cli/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ use tracing::info;
use libcli::database::DatabseSub;
use libserver::start;

const ABOUT: &str = "playa Application Command Line Interface";
const ABOUT: &str = "townhall Application Command Line Interface";

#[derive(Debug, Parser)]
#[command(next_line_help = true)]
#[command(name = "playa", author, version, about, long_about = Some(ABOUT))]
#[command(name = "townhall", author, version, about, long_about = Some(ABOUT))]
pub enum Cli {
/// Manage Database
#[clap(subcommand)]
Database(DatabseSub),
/// Initializes and starts playa Server
/// Initializes and starts townhall Server
Serve,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use sea_orm_cli::commands::generate::run_generate_command;
use sea_orm_cli::{DateTimeCrate, GenerateSubcommands};

use migration::{Migrator, MigratorTrait};
use playa::shared::database::Database;
use townhall::shared::database::Database;

use crate::config::DATABASE_URL_ENV_VAR;

Expand Down
2 changes: 1 addition & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
authors = ["Esteban Borai <[email protected]>"]

[lib]
name = "playa"
name = "townhall"
path = "src/lib.rs"

[dependencies]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use sea_orm_migration::prelude::*;

use playa::image::model::{IMAGE_JPEG, IMAGE_PNG};
use townhall::image::model::{IMAGE_JPEG, IMAGE_PNG};

#[derive(DeriveMigrationName)]
pub struct Migration;
Expand Down
4 changes: 2 additions & 2 deletions crates/server/src/graphql/modules/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ pub struct Image {
url: String,
}

impl From<playa::image::model::Image> for Image {
fn from(value: playa::image::model::Image) -> Self {
impl From<townhall::image::model::Image> for Image {
fn from(value: townhall::image::model::Image) -> Self {
Image {
id: Pxid::from(value.id),
url: value.url,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use async_graphql::{Context, InputObject, Result, SimpleObject};
use pxid::graphql::Pxid;
use serde::{Deserialize, Serialize};

use playa::post::service::CreatePostDto;
use townhall::post::service::CreatePostDto;

use crate::context::SharedContext;
use crate::graphql::modules::post::types::{Post, PostError, PostErrorCode};
Expand Down
2 changes: 1 addition & 1 deletion crates/server/src/graphql/modules/post/query/posts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use async_graphql::connection::{query, Connection, Edge, EmptyFields};
use async_graphql::{Context, Result};
use pxid::graphql::Pxid;

use playa::shared::pagination::Pagination;
use townhall::shared::pagination::Pagination;

use crate::context::SharedContext;
use crate::graphql::connection_details::ConnectionDetails;
Expand Down
10 changes: 5 additions & 5 deletions crates/server/src/graphql/modules/post/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use chrono::{DateTime, Utc};
use pxid::graphql::Pxid;
use serde::{Deserialize, Serialize};

use playa::shared::pagination::Pagination;
use playa::user::repository::user::UserFilter;
use townhall::shared::pagination::Pagination;
use townhall::user::repository::user::UserFilter;

use crate::context::SharedContext;
use crate::graphql::modules::user::types::User;
Expand Down Expand Up @@ -54,12 +54,12 @@ impl Post {
.unwrap();
let user = qs.first().unwrap().to_owned();

User::try_from(user).unwrap()
User::from(user)
}
}

impl From<playa::post::model::Post> for Post {
fn from(value: playa::post::model::Post) -> Self {
impl From<townhall::post::model::Post> for Post {
fn from(value: townhall::post::model::Post) -> Self {
Post {
id: value.id.into(),
author_id: value.author_id.into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use async_graphql::{Context, Result, SimpleObject};
use serde::{Deserialize, Serialize};
use tracing::instrument;

use playa::user::service::UploadAvatarDto;
use townhall::user::service::UploadAvatarDto;

use crate::context::SharedContext;
use crate::graphql::modules::user::types::{UserError, UserErrorCode};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use async_graphql::{Context, Result, SimpleObject};
use pxid::graphql::Pxid;
use serde::{Deserialize, Serialize};

use playa::user::service::FollowPeers;
use townhall::user::service::FollowPeers;

use crate::context::SharedContext;
use crate::graphql::modules::user::types::{UserError, UserErrorCode};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::str::FromStr;
use async_graphql::{Context, InputObject, Result, SimpleObject};
use serde::{Deserialize, Serialize};

use playa::user::model::{Password, Username};
use playa::user::service::CreateUserDto;
use townhall::user::model::{Password, Username};
use townhall::user::service::CreateUserDto;

use crate::context::SharedContext;
use crate::graphql::modules::user::types::{User, UserError, UserErrorCode};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use async_graphql::{Context, Result, SimpleObject};
use pxid::graphql::Pxid;
use serde::{Deserialize, Serialize};

use playa::user::service::FollowPeers;
use townhall::user::service::FollowPeers;

use crate::context::SharedContext;
use crate::graphql::modules::user::types::{UserError, UserErrorCode};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use async_graphql::{Context, InputObject, Result, SimpleObject};
use serde::{Deserialize, Serialize};

use playa::user::repository::user::UpdateUserDto;
use townhall::user::repository::user::UpdateUserDto;

use crate::context::SharedContext;
use crate::graphql::modules::user::types::{User, UserError, UserErrorCode};
Expand Down
6 changes: 3 additions & 3 deletions crates/server/src/graphql/modules/user/query/users.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use async_graphql::connection::{query, Connection, Edge, EmptyFields};
use async_graphql::{Context, InputObject, Result};
use pxid::graphql::Pxid;

use playa::shared::pagination::Pagination;
use playa::user::model::{Email, Username};
use playa::user::repository::user::UserFilter;
use townhall::shared::pagination::Pagination;
use townhall::user::model::{Email, Username};
use townhall::user::repository::user::UserFilter;

use crate::context::SharedContext;
use crate::graphql::connection_details::ConnectionDetails;
Expand Down
Loading

0 comments on commit 5e0897a

Please sign in to comment.