chore: move shared files into .github repo

This commit is contained in:
Elias Schneider
2026-10-11 00:23:33 +02:00
parent fd7951f70e
commit 3355b656b5
7 changed files with 3 additions and 153 deletions
-2
View File
@@ -1,2 +0,0 @@
# These are supported funding model platforms
github: [stonith404, kmendell]
+1 -1
View File
@@ -1,5 +1,5 @@
name: ❓ Question
description: "Ask a question
description: "Ask a question"
title: "❓ Question:"
labels: [question]
body:
-12
View File
@@ -1,12 +0,0 @@
## What and why
## Related issue
## Screenshots
## Contributing Guidelines
Have you read the [Contributing Guidelines](https://github.com/pocket-id/pocket-id/blob/main/CONTRIBUTING.md)?
- [ ] If I'm implementing a new feature, I have opened an issue first, or commented on an existing one, to discuss the implementation details.
- [ ] I have read the [AI Usage Guidelines](https://github.com/pocket-id/pocket-id/blob/main/CONTRIBUTING.md#ai-usage-policy).
-124
View File
@@ -1,124 +0,0 @@
# Contributing
We are happy that you want to contribute to Pocket ID and help to make it better!
## Before you start
Before starting to work on a new feature, please open an issue first, or comment on an existing one, to discuss the implementation details. This saves you time and avoids the disappointment of having a PR closed later because the change doesn't fit the project's direction.
### AI Usage Policy
We have nothing against using AI tools to assist your development. However, AI must not replace the human contribution behind a new feature. **Simply copying a feature request into an AI tool, generating code, and submitting the result as a pull request is not accepted.** Maintainers can already do that themselves, so this workflow provides no meaningful advantage to the project.
This restriction applies to new features, not bug fixes. For feature contributions, we expect meaningful human involvement such as thoughtfully prompting and iterating, making implementation decisions and reviewing and reflecting the output.
#### Guidelines for Using AI Tools
To keep contributions reviewable and high-quality, please follow these guidelines when using AI tools:
1. **Do not submit prompt-only feature implementations.** A new feature must include meaningful human input beyond passing the feature request to an AI tool and submitting its output. This restriction does not apply to bug fixes.
2. **Understand every line.** You must be able to explain what your code does and why, in your own words. "The AI wrote it" is not an acceptable answer to a reviewer's question.
3. **Test before submitting.** Review and test all code manually, as a human, before opening a PR. Don't trust the AI's claim that it works.
4. **Write your own words.** Don't paste AI-generated text into issues, comments, or PR descriptions. Walls of generated text make discussions harder, not easier.
Feature PRs that appear to be low-effort AI output may be closed without a detailed review.
## Getting started
### Submit a Pull Request
Before you submit the pull request for review please ensure that
- The pull request naming follows the [Conventional Commits specification](https://www.conventionalcommits.org):
`<type>[optional scope]: <description>`
example:
```
fix: hide global audit log switch for non admin users
```
Where `TYPE` can be:
- **feat** - is a new feature
- **doc** - documentation only changes
- **fix** - a bug fix
- **refactor** - code change that neither fixes a bug nor adds a feature
- Your pull request has a detailed description
- You run `pnpm format` to format the code
### Development Environment
Pocket ID consists of a frontend and backend. In production the frontend gets statically served by the backend, but in development they run as separate processes to enable hot reloading.
There are two ways to get the development environment setup:
#### 1. Install required tools
##### With Dev Containers
If you use [Dev Containers](https://code.visualstudio.com/docs/remote/containers) in VS Code, you don't need to install anything manually, just follow the steps below.
1. Make sure you have [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension installed
2. Clone and open the repo in VS Code
3. VS Code will detect .devcontainer and will prompt you to open the folder in devcontainer
4. If the auto prompt does not work, hit `F1` and select `Dev Containers: Open Folder in Container.`, then select the pocket-id repo root folder and it'll open in container.
##### Without Dev Containers
If you don't use Dev Containers, you need to install the following tools manually:
- [Node.js](https://nodejs.org/en/download/) >= 24
- [Go](https://golang.org/doc/install) >= 1.27
- [Git](https://git-scm.com/downloads)
#### 2. Setup
##### Backend
The backend is built with [Gin](https://gin-gonic.com) and written in Go. To set it up, follow these steps:
1. Open the `backend` folder
2. Copy the `.env.development-example` file to `.env` and edit the variables as needed
3. Start the backend with `go run -tags exclude_frontend ./cmd`
##### Frontend
The frontend is built with [SvelteKit](https://kit.svelte.dev) and written in TypeScript. To set it up, follow these steps:
1. Open the `pocket-id` project folder
2. Copy the `frontend/.env.development-example` file to `frontend/.env` and edit the variables as needed
3. Install the dependencies with `pnpm install`
4. Start the frontend with `pnpm dev`
You're all set! The application is now listening on `localhost:3000`. The backend gets proxied trough the frontend in development mode.
### Testing
If you are contributing to a new feature please ensure that you add tests for it.
#### End-to-end tests
We are using [Playwright](https://playwright.dev) for end-to-end testing.
The tests are located in the `tests` folder at the root of the project.
The tests can be run like this:
1. Install the dependencies from the root of the project `pnpm install`
2. Visit the setup folder by running `cd tests/setup`
3. Start the test environment by running `docker compose up -d --build`
4. Go back to the test folder by running `cd ..`
5. Run the tests with `pnpm dlx playwright test` or from the root project folder `pnpm test`
If you make any changes to the application, you have to rebuild the test environment by running `docker compose up -d --build` again.
#### Unit tests
In the backend we are using unit tests with the built-in Go testing framework. The tests are located in the same folder as the code they are testing and have the `_test.go` suffix.
To run the tests, simply run `go test -tags=exclude_frontend,unit ./...` from the root of the `backend` folder.
+1 -1
View File
@@ -27,7 +27,7 @@ Visit the [documentation](https://docs.pocket-id.org) for the setup guide and mo
## Contribute
You're very welcome to contribute to Pocket ID! Please follow the [contribution guide](/CONTRIBUTING.md) to get started.
You're very welcome to contribute to Pocket ID! Please follow the [contribution guide](https://github.com/pocket-id/.github/blob/main/CONTRIBUTING.md) to get started. See the [development guide](https://pocket-id.org/docs/helping-out/development) for setup, formatting, and testing instructions.
<div align="center">
<br />
-12
View File
@@ -1,12 +0,0 @@
# Security Policy
## Supported Versions
It's recommended to always use the latest version of Pocket ID. We will provide security updates for the latest version.
> [!NOTE]
> Updates can be automated with e.g [Watchtower](https://github.com/nicholas-fedor/watchtower/). Upgrading between non major versions is safe but you shouldn't upgrade between major versions before checking the release notes.
## Reporting a Vulnerability
Thank you for taking the time to report a vulnerability. Please DO NOT create an issue on GitHub because the vulnerability could get exploited. Instead please create a Security Advisory [here](https://github.com/pocket-id/pocket-id/security/advisories/new). You can learn more about how to report a vulnerability in the [GitHub Security Advisories documentation](https://docs.github.com/en/code-security/security-advisories/creating-a-security-advisory).
+1 -1
View File
@@ -12,7 +12,7 @@ services:
francis-runtime:
# The version comes from the Francis dependency in backend/go.mod, so the runtime always matches the client Pocket ID is built with
# Set it with: echo "FRANCIS_VERSION=$(./francis-version.sh)" > .env
image: ghcr.io/italypaleale/francis:${FRANCIS_VERSION:?run ./francis-version.sh to set it, see CONTRIBUTING.md}
image: ghcr.io/italypaleale/francis:${FRANCIS_VERSION:?run ./francis-version.sh to set it, see https://pocket-id.org/docs/helping-out/development}
volumes:
- ./francis-config.yaml:/etc/francis/config.yaml:ro
# The image ships its own HEALTHCHECK, which probes the runtime over the loopback