2.5 KiB
Contributing
I am happy that you want to contribute to Pocket ID and help to make it better! All contributions are welcome, including issues, suggestions, pull requests and more.
Getting started
You've found a bug, have suggestion or something else, just create an issue on GitHub and we can get in touch.
Submit a Pull Request
Before you submit the pull request for review please ensure that
-
The pull request naming follows the Conventional Commits specification:
<type>[optional scope]: <description>example:
feat(share): add password protectionWhere
TYPEcan 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
npm run formatto format the code
Setup project
Pocket ID consists of a frontend, backend and a reverse proxy. There are two ways to get the development environment setup:
1. Using DevContainers
- Make sure you have Dev Containers extension installed
- Clone and open the repo in VS Code
- VS Code will detect .devcontainer and will prompt you to open the folder in devcontainer
- If the auto prompt does not work, hit
F1and selectDev Containers: Open Folder in Container., then select the pocket-id repo root folder and it'll open in container.
2. Manual
Backend
The backend is built with Gin and written in Go.
Setup
- Open the
backendfolder - Copy the
.env.examplefile to.envand edit the variables as needed - Start the backend with
go run -tags e2etest,exclude_frontend ./cmd
Frontend
The frontend is built with SvelteKit and written in TypeScript.
Setup
- Open the
frontendfolder - Copy the
.env.examplefile to.envand edit the variables as needed - Install the dependencies with
npm install - Start the frontend with
npm run dev
You're all set! The application is now listening on localhost:3000. The backend gets proxied trough the frontend in development mode.
Testing
We are using Playwright for end-to-end testing.
The tests can be run like this:
- Start the backend normally
- Start the frontend in production mode with
npm run build && node --env-file=.env build/index.js - Run the tests with
npm run test