Thank you for your interest in contributing to LightNet! 🎉 We welcome contributions of all kinds—whether you’re fixing a typo, writing documentation, improving tests, or adding new features.
This guide will help you get started and explains how to make your contributions effective and easy to review.
- Ways to contribute
- Quickstart for new contributors
- Development setup
- Making changes
- Testing
- Translations
- Understanding LightNet
- Thank you
There are many ways to help LightNet grow:
- Report bugs: Open an issue.
- Fix issues: Browse open issues (look for “good first issue”).
- Improve docs: Fix typos, clarify instructions, or add examples.
- Translate: Add or improve UI translations.
- Review pull requests: Help maintain quality by reviewing contributions from others.
💡 Tip for beginners: New to GitHub? Check out GitHub’s Hello World guide.
-
Fork the repo from LightNet on GitHub.
-
Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/lightnet.git cd lightnet -
Install dependencies (requires Node.js 22+ and pnpm):
pnpm install
-
Start the dev server:
pnpm dev
Open http://localhost:4321 to preview changes.
- Node.js: v22+ (use version in
.nvmrc) - pnpm: version specified in
packageManagerinsidepackage.json
We recommend VS Code with these extensions:
A
.vscode/extensions.jsonfile is included to help set this up.
This is a monorepo, containing:
packages/→ Core LightNet packagesplayground/→ Example playground sites
-
Create a branch for your changes:
git checkout -b feature/my-change
-
Make edits and commit them (clear, descriptive messages encouraged).
-
Run checks:
pnpm format pnpm lint --fix
-
Add a changeset if your change affects published packages:
pnpm changeset
-
Push your branch and open a pull request (PR).
- Link related issues in your PR description.
- Include screenshots for UI changes if applicable.
- Keep PRs focused and small when possible.
Run the dev server to see changes live:
pnpm devLocated in packages/lightnet/__tests__/.
Run with:
cd packages/lightnet
pnpm testLocated in packages/lightnet/__e2e__/.
Run with:
cd packages/lightnet
pnpm e2eUse E2E tests sparingly—they are slower than unit tests, but great for testing real browser interactions.
LightNet’s UI supports multiple languages.
-
Translation files live in:
packages/lightnet/src/i18n/translations -
Add or edit YAML files to improve translations.
-
Test locally by running:
pnpm dev
Then switch languages in the UI.
LightNet’s core lives in the packages/lightnet workspace and is exposed as an Astro integration. The entry point exports/index.ts re‑exports the integration function and its configuration types. During astro:config:setup, the integration injects all built‑in routes (root, search, details, API endpoints), registers middleware, and augments the project’s Vite and i18n settings.
Content is modeled with Zod schemas under src/content. LIGHTNET_COLLECTIONS wires these schemas into Astro’s content collection system, allowing LightNet to query categories, media, media types, and collections in a consistent way. A middleware in src/i18n/locals.ts attaches translation helpers and locale metadata to Astro.locals, so any component can access locals.i18n without extra imports. For example, the /api/search.json endpoint reads all media entries via getMediaItems() and returns a pre‑sorted search index.
Directory overview
src/astro-integration/– integration setup, config schema, Vite plugin.src/content/– Zod schemas and helpers for categories, media items, media types, and collections.src/pages/– Astro pages and API handlers (RootRoute, SearchPageRoute, DetailsPageRoute, api/search.ts, api/versions.ts).src/components/&src/layouts/– reusable UI blocks.src/i18n/– translation files and locale utilities.__tests__/&__e2e__/– Vitest and Playwright test suites.
Every contribution—big or small—helps make LightNet better. We deeply appreciate your time, effort, and creativity.