···11+# Contributing to Lumina
22+33+> IMPORTANT
44+>
55+> This project is not hosted on GitHub or Codeberg. However, you can contribute by sending pull requests to the project's repository or any of it's official mirrors. I'll be happy to review and merge your contributions to the main repository.
66+>
77+> If you turn into a frequent contributor, you may contact me to gain a <https://git.strawmelonjuice.com/> account to contribute on the main repository.
88+99+Thank you for your interest in contributing! This document outlines how to set up your environment, follow the style, and submit changes.
1010+1111+---
1212+1313+## Where to contribute
1414+1515+- Main repository (primary): <https://git.strawmelonjuice.com/strawmelonjuice/lumina>
1616+- Official mirrors: <https://codeberg.org/strawmelonjuice/lumina>, <https://github.com/strawmelonjuice/lumina>
1717+- Note about GitHub: Any changes made on GitHub will be overwritten by automated force-pushes from strawmelonjuiceforge and may not be reviewed.
1818+1919+Please open issues and submit pull requests (PRs) on the main repository or an official mirror.
2020+2121+Frequent contributors may request an account on the main forge to collaborate more directly: <https://git.strawmelonjuice.com/>.
2222+2323+---
2424+2525+## Code of Conduct
2626+2727+- Be respectful and constructive.
2828+- Assume good intent and seek clarity.
2929+- Harassment, discrimination, and personal attacks are not tolerated.
3030+3131+If you experience or witness unacceptable behavior, contact the maintainer via the main forge.
3232+3333+---
3434+3535+## Project layout
3636+3737+- `server/` — Rust (Rocket) server application.
3838+- `client/` — Gleam application targeting JavaScript (bundled to browser).
3939+- `mise/` — Task definitions for development flows.
4040+- `data/` — Local runtime data directory (created by tasks).
4141+- Root files — Workspace-level configuration, license, docs, and Docker-related files.
4242+4343+---
4444+4545+## Prerequisites
4646+4747+- Rust toolchain (latest stable) with `rustfmt` and (optionally) `clippy`.
4848+- Gleam.
4949+- Bun.
5050+- Node is not required when using Bun.
5151+- Redis/Postgres if you want to test those backends, otherwise SQLite is the default for development.
5252+- Optional: Watchexec (installed automatically via tasks), Taplo, Prettier (run via tasks).
5353+5454+This repository uses `mise` to manage tools and developer tasks:
5555+- Install mise: https://mise.jdx.dev/
5656+- Then install toolchain/tool deps used by the project and tasks:
5757+ ```sh
5858+ mise install
5959+ ```
6060+6161+---
6262+6363+## Local setup
6464+6565+Environment is configured via environment variables. For development, the server prefers a `.env` file in your instance folder: `$LUMINAFOLDER/.env`.
6666+6767+Key variables (defaults exist for development):
6868+- `LUMINA_DB_TYPE` — `sqlite` or `postgres` (default: `sqlite`)
6969+- `LUMINA_REDIS_URL` — `redis://127.0.0.1/`
7070+- `LUMINA_SERVER_ADDR` — `127.0.0.1`
7171+- `LUMINA_SERVER_PORT` — `8085`
7272+- And others described in `README.MD`
7373+7474+First-time setup:
7575+```sh
7676+# From repo root
7777+mise install
7878+mise run build-server
7979+```
8080+8181+Development run options:
8282+```sh
8383+# Fast development with auto-restart on changes
8484+mise run development-run-watch # add -podman to run in podman, since otherwise you'll need to run a Redis server and a PostgreSQL server locally.
8585+8686+# Or run once (debug)
8787+mise run development-run # add -podman to run in podman, since otherwise you'll need to run a Redis server and a PostgreSQL server locally.
8888+8989+# Or an optimized (release) development run
9090+mise run optimised-development-run # You need to have a Redis server and a PostgreSQL server running locally.
9191+```
9292+9393+There are more variations. Run `mise run` and type 'development' in the task finder to list all of them.
9494+9595+The build pipeline (mise) takes care of client (Gleam) compilation and styles, and it will create necessary data directories.
9696+9797+---
9898+9999+## Formatting, checks, and quality
100100+101101+Before pushing or opening a PR, run:
102102+```sh
103103+# Format Rust, Gleam, and meta files
104104+mise run format
105105+106106+# Basic checks (Rust and Gleam)
107107+mise run check
108108+109109+# Build to ensure it compiles
110110+mise run build-server
111111+112112+# Optionally: There are some watching tasks and tasks to run Lumina niet development mode
113113+mise run check-watch
114114+mise run development-run-watch-podman
115115+# ..etc.
116116+```
117117+118118+Conventions:
119119+- Rust code is formatted with `rustfmt`.
120120+- Gleam code is formatted with `gleam format`.
121121+- Meta files are formatted via Prettier and Taplo.
122122+- Prefer clear, explicit error handling and logs over silent failures.
123123+- Keep modules cohesive and prefer small, testable units.
124124+125125+---
126126+127127+## Branching and commit messages
128128+129129+- Create feature branches from the default branch (typically `main`).
130130+ - Suggested naming: `feat/<short-name>`, `fix/<short-name>`, `docs/<short-name>`, `chore/<short-name>`.
131131+- Commit messages:
132132+ - Be concise and descriptive.
133133+ - Prefer Conventional Commits style when possible:
134134+ - `feat: add user session cleanup job`
135135+ - `fix(server): handle empty redis url`
136136+ - `docs: improve contributing guide`
137137+138138+---
139139+140140+## Pull requests
141141+142142+PR checklist:
143143+- Code is formatted and builds locally.
144144+- `mise run check` passes.
145145+- Include tests when adding logic or fixing bugs (Rust: `cargo test`; Gleam: `gleam test`).
146146+- Update docs (README/WHY/ABOUT) where relevant.
147147+- Keep PRs focused. Large refactors should be split or well-justified.
148148+149149+Review expectations:
150150+- Be prepared to discuss design decisions and trade-offs.
151151+- Address review comments via additional commits (avoid force-push unless asked).
152152+- Squash commits at merge time if appropriate.
153153+154154+---
155155+156156+## Reporting bugs
157157+158158+When filing a bug report:
159159+- Describe what you expected to happen and what actually happened.
160160+- Include steps to reproduce.
161161+- Provide version info (commit hash) and environment (OS, DB type, Redis/Postgres versions).
162162+- Include relevant logs or stack traces when possible.
163163+164164+---
165165+166166+## Feature requests
167167+168168+When proposing a feature:
169169+- Explain the problem it solves and the target use-cases.
170170+- Consider alternatives and why this approach is preferred.
171171+- If possible, include a small design sketch (API, data flow, or UI).
172172+- Prototype branches are welcome if they help the discussion.
173173+174174+---
175175+176176+## Security
177177+178178+If you discover a security issue:
179179+- Do not open a public issue with sensitive details.
180180+- Contact me privately via the email on my main forge.
181181+- Provide clear reproduction steps and affected versions.
182182+- A fix or mitigation plan will be discussed before public disclosure.
183183+184184+---
185185+186186+## Tests
187187+188188+- Rust: place tests alongside modules or in `server/` integration tests, use `cargo test`.
189189+- Gleam: use `gleam test` for client-side logic where applicable.
190190+- Prefer deterministic tests; avoid timing-based flakes.
191191+- Add tests for new behavior and regression tests for fixed bugs.
192192+193193+---
194194+195195+## License and contributor terms
196196+197197+By contributing, you agree that your contributions are licensed under the BSD 3-Clause License of this repository, unless explicitly stated otherwise in writing.
198198+199199+See `LICENSE` at the repository root.
200200+201201+---
202202+203203+## Thank you
204204+205205+Your time and effort are appreciated. Whether you’re reporting a bug, improving docs, or adding features—every contribution helps make Lumina better.
+2-2
README.MD
···11# Lumina(/peonies) server
2233> Notice:
44-> This repo is edited on [My personal forge](https://git.strawmelonjuice.com/strawmelonjuice/lumina) and mirrorred on [codeberg](https://codeberg.org/strawmelonjuice/lumina).
55-> Any changes in the code on github will be overwritten by automated force-push from Codeberg.
44+> This repo is edited on [My personal forge](https://git.strawmelonjuice.com/strawmelonjuice/lumina) and mirrorred on [codeberg](https://codeberg.org/strawmelonjuice/lumina) and [GitHub](https://github.com/strawmelonjuice/lumina). But you can still send in a PR!
55+> See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
6677## -> Rewrite '25'
88