# readme.md for @foss.global/foss.global

Official codebase for the foss.global website, built with TypeScript and the @api.global ecosystem.

## Prerequisites

- Node.js (>=18)
- pnpm
- (Optional) GITEA_TOKEN environment variable or `.nogit/GITEA_TOKEN` file for fetching commit data

## Installation

```bash
pnpm install
```

## Build

Compile TypeScript and bundle the website:

```bash
pnpm build
```

## Watch

Rebuild on file changes:

```bash
pnpm watch
```

## Start

Start the CLI web server:

```bash
pnpm start
```

Start using the TypeScript entrypoint:

```bash
pnpm run startTs
```

## Usage Example

After starting the server, open your browser at http://localhost:3000 to view the site and API.

## Testing

Currently no automated tests are defined. The `pnpm test` command runs the build process.

## Project Structure

```
./
├── ts/             # CLI source files
├── ts_web/         # Frontend source files
├── html/           # Static HTML templates
├── assets/         # Static assets (images, styles, etc.)
├── dist_ts/        # Compiled CLI output
├── dist_serve/     # Bundled website for serving
├── cli.js          # Node.js CLI entrypoint
├── cli.ts.js       # TypeScript CLI entrypoint
└── readme.md       # Project README
```

## Module/Plugin Import Guidelines

CLI code imports modules via a central plugin file:

```ts
import * as plugins from './ffb.plugins.js';
```

Web code generally imports directly from packages or uses `ts_web/plugins.ts` when applicable.

## Contributing

Contributions are welcome! To contribute:

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/YourFeature`)
3. Commit your changes (`git commit -m "Add awesome feature"`)
4. Push to your fork (`git push origin feature/YourFeature`)
5. Open a pull request against the `main` branch

Please follow the existing code style and run `pnpm build` before submitting.

## License

This project is **UNLICENSED**. See `package.json` for details.

## Contact / Support

- Repository: https://code.foss.global/losslessone_websites/foss.global
- Issues: https://code.foss.global/losslessone_websites/foss.global/issues