Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Default owners for everything in the repo.
# Replace these usernames with the actual GitHub handles of the maintainers.
* @Ataba @razimograbi
64 changes: 64 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Bug Report
description: Report a bug or unexpected behavior in ByteForge
title: "[Bug]: "
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug. Please fill out the sections below.

- type: textarea
id: description
attributes:
label: What happened?
description: A clear description of the bug.
validations:
required: true

- type: textarea
id: repro
attributes:
label: Steps to reproduce
description: Minimal steps to reproduce the behavior.
placeholder: |
1. Start the server with ...
2. Send command ...
3. Observe ...
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behavior
validations:
required: true

- type: dropdown
id: platform
attributes:
label: Platform
options:
- Linux
- Windows
- Docker
- Other
validations:
required: true

- type: input
id: version
attributes:
label: Commit / version
description: Commit hash or release tag you're running.
validations:
required: false

- type: textarea
id: logs
attributes:
label: Relevant logs / stack trace
render: shell
validations:
required: false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/OWNER/REPO/discussions
about: Use Discussions for general questions instead of an issue.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Feature Request
description: Suggest an improvement or new feature for ByteForge
title: "[Feature]: "
labels: ["enhancement", "triage"]
body:
- type: textarea
id: problem
attributes:
label: What problem does this solve?
description: What's missing or painful right now?
validations:
required: true

- type: textarea
id: proposal
attributes:
label: Proposed solution
description: What would you like to see happen?
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
validations:
required: false

- type: textarea
id: context
attributes:
label: Additional context
validations:
required: false
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Summary

<!-- What does this PR do and why? -->

## Related issue

Closes #

## Type of change

- [ ] Bug fix
- [ ] New feature
- [ ] Refactor / internal change
- [ ] Documentation
- [ ] Build / CI

## How was this tested?

<!-- Commands run, platform(s) tested (Linux / Windows / Docker), test cases added -->

## Checklist

- [ ] Code builds locally (`cmake --build build`)
- [ ] Tests pass (`ctest --test-dir build`)
- [ ] Added/updated tests for the change
- [ ] Updated documentation if needed
- [ ] Follows the project's header-guard / .h-.cpp split / Doxygen-comment conventions
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
23 changes: 23 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
documentation:
- changed-files:
- any-glob-to-any-file:
- "**/*.md"
- "docs/**"

ci:
- changed-files:
- any-glob-to-any-file:
- ".github/workflows/**"

build:
- changed-files:
- any-glob-to-any-file:
- "CMakeLists.txt"
- "**/CMakeLists.txt"
- "Dockerfile"

tests:
- changed-files:
- any-glob-to-any-file:
- "**/tests/**"
- "**/*test*.cpp"
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build-linux:
name: Build & Test (Linux)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Install Ninja
run: sudo apt-get update && sudo apt-get install -y ninja-build

- name: Configure
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build build

- name: Test
run: ctest --test-dir build --output-on-failure

build-windows:
name: Build & Test (Windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Install Ninja
run: choco install ninja -y

- name: Configure
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build build

- name: Test
run: ctest --test-dir build --output-on-failure
17 changes: 17 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Pull Request Labeler"

on:
pull_request_target:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: write

jobs:
label:
runs-on: ubuntu-24.04
steps:
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
25 changes: 25 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Close stale issues and PRs"

on:
schedule:
- cron: "30 1 * * *"
workflow_dispatch:

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-24.04
steps:
- uses: actions/stale@v9
with:
days-before-stale: 60
days-before-close: 14
stale-issue-message: "This issue has been inactive for 60 days and will be closed in 14 days if there's no further activity."
stale-pr-message: "This PR has been inactive for 60 days and will be closed in 14 days if there's no further activity."
stale-issue-label: "stale"
stale-pr-label: "stale"
exempt-issue-labels: "pinned,in-progress"
exempt-pr-labels: "pinned,in-progress"
66 changes: 66 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Contributing to ByteForge

Thanks for your interest in contributing. This project is maintained by a small team, so contributions go through forks and pull requests — there's no direct push access for non-collaborators.

## Before you start

- Check open [Issues](../../issues) and [PRs](../../pulls) to avoid duplicate work.
- For anything non-trivial (new feature, architecture change), open an issue first to discuss the approach before writing code.
- Small fixes (typos, docs, obvious bugs) can go straight to a PR.

## Workflow

1. **Fork** the repository (you won't be able to push branches directly unless you're a collaborator).
2. **Branch** off `main` using this naming scheme (Git flow style):
- `feature/<short-description>`
- `fix/<short-description>`
- `chore/<short-description>`
- `docs/<short-description>`
3. **Build and test locally** before opening a PR (see below).
4. **Commit** with clear, descriptive messages. Keep commits scoped to one logical change.
5. **Open a pull request** against `main` using the PR template. Link the related issue if there is one.
6. Respond to review feedback — PRs need at least one approval and a passing CI run before merge.

## Building the project

ByteForge uses CMake + Ninja and targets C++23.

```bash
cmake -S . -B build -G Ninja
cmake --build build
```

Run the test suite (GoogleTest, fetched via CMake FetchContent):

```bash
ctest --test-dir build --output-on-failure
```

The project builds cross-platform (Linux via epoll, Windows via IOCP) behind a shared `IEventLoop` interface — if your change touches the event loop, please test on both platforms if you can, or note in the PR which platform you tested.

## Code style

- Header guards: `#ifndef` / `#define` / `#endif` (no `#pragma once`).
- Split declarations and definitions into `.h` / `.cpp` files.
- Document public APIs with short Doxygen-style `/** */` comments — keep them concise, not verbose.
- Match the formatting of surrounding code (brace style, naming conventions) rather than introducing a new style in a file.

## Pull request expectations

- One feature/fix per PR — keep diffs reviewable.
- Include or update tests for behavioral changes.
- Update documentation (README, code comments) if the change affects usage or public interfaces.
- CI must pass (build + tests) before merge.
- Don't fabricate benchmark numbers in PR descriptions — if you're citing performance impact, include how you measured it.

## Reporting bugs / requesting features

Use the issue templates — they'll prompt for the info needed to reproduce a bug or evaluate a feature request. Issues from non-collaborators are welcome; just keep them scoped and specific.

## Code of conduct

Be respectful and constructive in issues, PRs, and reviews. Disagreements about technical approach are fine and expected — keep them focused on the code, not the person.

## Questions

Open a [Discussion](../../discussions) or a low-priority issue tagged `question`.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ COPY . .

# Run CMake and build the database
RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release && \
cmake --build build --target KV_Database
cmake --build build && \
cd build && ctest --output-on-failure

# ==========================================
# Stage 2: Minimal Runtime (Production-grade)
Expand Down
Loading