- Shell 100%
| .forgejo | ||
| ISSUE_TEMPLATE | ||
| scripts | ||
| .editorconfig | ||
| .gitignore | ||
| .prettierrc | ||
| package.json | ||
| pull_request_template.md | ||
| README.md | ||
| tsconfig.json | ||
| xegames.config.yml | ||
template-node
Template for XeplosionGames Node.js and web frontend projects. Includes TypeScript, Prettier formatting, CI/CD workflows, and release artifact building. Designed primarily for frontend projects but flexible enough for Node backends.
Creating a repo from this template
- Click Use this template on Forgejo
- Update
package.json— setnameanddescription - Replace
src/index.tswith your project code - Follow the setup checklist below
Setup checklist
- Set
RELEASE_TOKENsecret in Settings → Secrets - Update
nameanddescriptioninpackage.json - Run
npm installto install dependencies - Implement
scripts/build.shfor your project - Run
create-project.shfromXeplosionGames/.forgejoto seed project board - Push to
mainand verify CI passes
If this project deploys as a service:
- Set
DEPLOY_TARGETsecret in Settings → Secrets - Set
healthcheck.enabled: trueinxegames.config.yml - Implement
scripts/service-start.shandscripts/validate.sh - Add deploy workflows from
XeplosionGames/.forgejo
Code style
This repo uses Prettier for formatting, configured
via .prettierrc.
To check formatting locally:
npm run format:check
To fix formatting locally:
npm run format
Conventions
| Rule | Value |
|---|---|
| Indentation | 2 spaces |
| Quotes | Single quotes |
| Semicolons | Required |
| Trailing commas | ES5 |
| Print width | 100 characters |
| Line endings | LF |
TypeScript
This template uses strict TypeScript. The following strict checks are enabled
beyond strict: true:
| Check | Purpose |
|---|---|
noUncheckedIndexedAccess |
Array/object access always includes undefined |
noImplicitOverride |
Must use override keyword when overriding |
exactOptionalPropertyTypes |
Optional properties cannot be set to undefined explicitly |
To type check without building:
npm run validate
Testing
Add your test framework of choice as a dev dependency. Jest and Vitest are
common options. Update the test script in package.json accordingly.
To run tests locally:
npm test
Workflows
| Workflow | Trigger | Purpose |
|---|---|---|
ci-node.yml |
Every push / PR | Prettier check + build + tests |
release.yml |
Tag push v* |
Generate release notes + attach build artifacts |
Branch structure
| Branch | Purpose |
|---|---|
main |
Production-ready, triggers release on tag |
dev |
Active development |
feature/* |
Short-lived feature branches, PR to dev |
hotfix/* |
Urgent fixes off main, PR to both main and dev |
Commit convention
All commits use Conventional Commits format with a trailing period: : .
| Type | Use for |
|---|---|
feat: |
New functionality |
fix: |
Bug fixes |
chore: |
Dependencies, tooling, refactors |
docs: |
Documentation only |
ci: |
CI/CD workflow changes |
perf: |
Performance improvements |
test: |
Adding or updating tests |
style: |
Formatting only, no logic change |