Anonymous forum with a focus on resource efficiency over features.
Find a file
2024-12-26 13:20:04 +01:00
client-solid Leftover formatting 2024-12-26 13:06:57 +01:00
container Merge branch 'master' of git.silversoft.se:Imbus/FrostByte 2024-03-05 07:05:18 +01:00
server Rust dependency bumps 2024-12-26 13:20:04 +01:00
.containerignore Moved and updated .containerignore 2023-10-20 22:47:25 +02:00
.gitignore Removed .sqlx from gitignore 2023-11-05 20:04:04 +01:00
CONTRIBUTING.md Better readme 2023-10-18 20:53:03 +02:00
justfile Clean target now force prunes unused images 2023-12-18 18:18:19 +01:00
LICENSE.md AGPL 2024-05-20 14:18:30 +02:00
README.md Formatting didnt work 2023-10-20 23:42:24 +02:00

FrostByte Forum

A simple forum written in Rust and Typescript.


Structure

  • server: Contains the web server code
  • client-solid: Contains the frontend client written in SolidJS

Setup

Running the project

There are two ways to run this project. The simple way and the manual way.

1. The simple way (with aforementioned Just and Podman)

To spin up a dev backend server, run:

just dev

For a complete list of targets, run:

just -l

Spin up a dev server with just dev or just just. Keep in mind that this is just the development api server, served on port 8080 by default.

The client is served from the vite dev server as usual at localhost:3000 by running npm run dev.

Congrats, you're now ready to hack!

For a project cleanup, you can run just clean. This will delete nore_modules and target directories etcetera. It will also stop and remove related images/containers.

For a more complete cleanup, you can run just nuke. This deletes everything related to this project AND all containers and images on your system. Use with caution.

2. The manual way

The client is a React application built with vite. npm run dev will start a dev server without a backend. ´npm run build´ will build the full application and drop it in the client/dist directory. This directory will then be served by the web server.


The server is a Rust application built with actix-web. cargo run will start a dev server with an in-memory database. cargo build --release will place a binary in server/target/release that can be run on a server. Note that the server binary will try to serve the client from server/public by default. This will be changable in the future.

# Local backend server
cd server
cargo run

# Dev client (vite)
cd client
npm run dev

Production build

Essentially, you need to build the client and copy the files to the server's public directory. Then you need to build the server in release mode and run it.

This is all bundled in the Containerfile. You can build the container with:

just start-release

Contributing

Contributions are welcome! Please read the contributing guidelines first.