├── .env ├── .gitignore ├── pkg ├── frontend │ ├── templates │ │ ├── input.css │ │ ├── home.jinja2 │ │ ├── room.jinja2 │ │ ├── users.jinja2 │ │ ├── profile.jinja2 │ │ ├── settings.jinja2 │ │ ├── register.jinja2 │ │ ├── users-partial.jinja2 │ │ ├── profile-partial.jinja2 │ │ ├── room-partial.jinja2 │ │ ├── settings-partial.jinja2 │ │ ├── home-partial.jinja2 │ │ ├── components │ │ │ ├── upload-show.jinja2 │ │ │ ├── button.jinja2 │ │ │ ├── settings.jinja2 │ │ │ ├── uploaded-file.jinja2 │ │ │ ├── layout.jinja2 │ │ │ ├── permission-search-results.jinja2 │ │ │ ├── users.jinja2 │ │ │ ├── user-profile-image.jinja2 │ │ │ ├── text-input.jinja2 │ │ │ ├── chatroom.jinja2 │ │ │ ├── room-user.jinja2 │ │ │ ├── user-search-results.jinja2 │ │ │ ├── message-list.jinja2 │ │ │ ├── user-rooms-name.jinja2 │ │ │ ├── user-buttons-enabled.jinja2 │ │ │ ├── user-buttons-disabled.jinja2 │ │ │ ├── invite.jinja2 │ │ │ ├── message.jinja2 │ │ │ ├── room-name.jinja2 │ │ │ ├── user-buttons-admin.jinja2 │ │ │ ├── title.jinja2 │ │ │ ├── user-item.jinja2 │ │ │ ├── user-profile-edit.jinja2 │ │ │ ├── user-profile-image-edit.jinja2 │ │ │ ├── sendmessageform.jinja2 │ │ │ ├── profile.jinja2 │ │ │ ├── private-room-users.jinja2 │ │ │ ├── partial-register.jinja2 │ │ │ ├── add-room.jinja2 │ │ │ ├── user-selection.jinja2 │ │ │ ├── sidebar.jinja2 │ │ │ └── thread-view.jinja2 │ │ ├── icons │ │ │ ├── send.jinja2 │ │ │ ├── emoji.jinja2 │ │ │ ├── levers.jinja2 │ │ │ ├── image.jinja2 │ │ │ ├── delete.jinja2 │ │ │ └── settings.jinja2 │ │ ├── base.jinja2 │ │ └── login.jinja2 │ ├── assets │ │ ├── favicon.ico │ │ ├── 404.svg │ │ ├── logo.svg │ │ ├── chat.svg │ │ └── wait.svg │ ├── assets.rs │ ├── Cargo.toml │ ├── tailwind.config.js │ ├── templates.rs │ ├── frontend.rs │ └── api.rs ├── database │ ├── migrations │ │ ├── 03_uploads.down.sql │ │ ├── 04_message_uploads.down.sql │ │ ├── 01_users.down.sql │ │ ├── 02_rooms.down.sql │ │ ├── 03_uploads.up.sql │ │ ├── 04_message_uploads.up.sql │ │ ├── 01_users.up.sql │ │ └── 02_rooms.up.sql │ ├── Cargo.toml │ ├── database.rs │ ├── uploads.rs │ ├── messages.rs │ ├── rooms.rs │ └── users.rs ├── rooms │ ├── Cargo.toml │ └── rooms.rs ├── users │ ├── Cargo.toml │ └── users.rs └── uploads │ ├── Cargo.toml │ └── uploads.rs ├── justfile ├── cmd └── chat │ ├── Cargo.toml │ └── src │ └── main.rs ├── Cargo.toml ├── .github └── workflows │ └── build.yml └── README.md /.env: -------------------------------------------------------------------------------- 1 | DATABASE_URL=sqlite://./data/db.sqlite -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | db.sqlite* 2 | /build/ 3 | data/ 4 | target/ -------------------------------------------------------------------------------- /pkg/frontend/templates/input.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /pkg/frontend/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedolphin/speakwith/HEAD/pkg/frontend/assets/favicon.ico -------------------------------------------------------------------------------- /pkg/frontend/templates/home.jinja2: -------------------------------------------------------------------------------- 1 | {% extends 'base.jinja2' %} 2 | 3 | {% block content %} 4 | {% include 'home-partial.jinja2' %} 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /pkg/frontend/templates/room.jinja2: -------------------------------------------------------------------------------- 1 | {% extends 'base.jinja2' %} 2 | 3 | {% block content %} 4 | {% include 'room-partial.jinja2' %} 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /pkg/frontend/templates/users.jinja2: -------------------------------------------------------------------------------- 1 | {% extends 'base.jinja2' %} 2 | 3 | {% block content %} 4 | {% include 'users-partial.jinja2' %} 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /pkg/frontend/templates/profile.jinja2: -------------------------------------------------------------------------------- 1 | {% extends 'base.jinja2' %} 2 | 3 | {% block content %} 4 | {% include 'profile-partial.jinja2' %} 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /pkg/frontend/templates/settings.jinja2: -------------------------------------------------------------------------------- 1 | {% extends 'base.jinja2' %} 2 | 3 | {% block content %} 4 | {% include 'settings-partial.jinja2' %} 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /pkg/database/migrations/03_uploads.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX IF EXISTS uploads_room_index; 2 | DROP INDEX IF EXISTS uploads_user_index; 3 | 4 | DROP TABLE IF EXISTS uploads; 5 | -------------------------------------------------------------------------------- /pkg/frontend/templates/register.jinja2: -------------------------------------------------------------------------------- 1 | {% extends 'base.jinja2' %} 2 | 3 | {% block content %} 4 | {% include 'components/partial-register.jinja2' %} 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /pkg/frontend/templates/users-partial.jinja2: -------------------------------------------------------------------------------- 1 | {% extends 'components/layout.jinja2' %} 2 | {% block current %} 3 | {% include 'components/users.jinja2' %} 4 | {% endblock %} 5 | -------------------------------------------------------------------------------- /pkg/database/migrations/04_message_uploads.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX IF EXISTS message_id_upload; 2 | DROP INDEX IF EXISTS upload_id_message; 3 | DROP TABLE IF EXISTS message_uploads; 4 | -------------------------------------------------------------------------------- /pkg/frontend/templates/profile-partial.jinja2: -------------------------------------------------------------------------------- 1 | {% extends 'components/layout.jinja2' %} 2 | {% block current %} 3 | {% include 'components/profile.jinja2' %} 4 | {% endblock %} 5 | -------------------------------------------------------------------------------- /pkg/frontend/templates/room-partial.jinja2: -------------------------------------------------------------------------------- 1 | {% extends 'components/layout.jinja2' %} 2 | {% block current %} 3 | {% include 'components/chatroom.jinja2' %} 4 | {% endblock %} 5 | -------------------------------------------------------------------------------- /pkg/frontend/templates/settings-partial.jinja2: -------------------------------------------------------------------------------- 1 | {% extends 'components/layout.jinja2' %} 2 | {% block current %} 3 | {% include 'components/settings.jinja2' %} 4 | {% endblock %} 5 | -------------------------------------------------------------------------------- /pkg/database/migrations/01_users.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX IF EXISTS user_profile_index; 2 | DROP TABLE IF EXISTS user_profiles; 3 | DROP INDEX IF EXISTS user_email_index; 4 | DROP TABLE IF EXISTS users; 5 | -------------------------------------------------------------------------------- /pkg/database/migrations/02_rooms.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX IF EXISTS message_user_index; 2 | DROP INDEX IF EXISTS message_room_index; 3 | DROP TABLE IF EXISTS messages; 4 | DROP TABLE IF EXISTS user_rooms; 5 | DROP TABLE IF EXISTS rooms; 6 | -------------------------------------------------------------------------------- /pkg/frontend/templates/home-partial.jinja2: -------------------------------------------------------------------------------- 1 | {% extends 'components/layout.jinja2' %} 2 | {% block current %} 3 |
{{ user.username }}
6 |4 | {{ user.name }} 5 |
6 | {% if loop.length > 1 %} 7 | 10 | {% endif %} 11 |{{ user.username }}
12 |localhost:3000/register/{{ register_id }}
3 |{{ message.message }}
19 |{{currentRoom.description}}
7 |11 | {{ item.username }} 12 |
13 |14 | {{ item.email }} 15 |
16 |