From b65b8a9e720ff4b3d1de6a374b114387099ecfdb Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Tue, 9 Sep 2025 19:53:24 +0500 Subject: [PATCH] Initial commit. --- .gitea/issue_template/bug-report.yaml | 35 +++++ .gitea/issue_template/feature-request.yaml | 21 +++ .gitea/workflows/on-push.yml | 26 ++++ .markdownlint.json | 4 + .pre-commit-config.yaml | 6 + .yamllint | 13 ++ CONTRIBUTING.md | 97 ++++++++++++ DCO | 33 ++++ README.md | 19 +++ ROADMAP.md | 173 +++++++++++++++++++++ docs/INDEX.md | 8 + docs/admin/INDEX.md | 1 + docs/devs/INDEX.md | 1 + docs/users/INDEX.md | 1 + 14 files changed, 438 insertions(+) create mode 100644 .gitea/issue_template/bug-report.yaml create mode 100644 .gitea/issue_template/feature-request.yaml create mode 100644 .gitea/workflows/on-push.yml create mode 100644 .markdownlint.json create mode 100644 .pre-commit-config.yaml create mode 100644 .yamllint create mode 100644 CONTRIBUTING.md create mode 100644 DCO create mode 100644 README.md create mode 100644 ROADMAP.md create mode 100644 docs/INDEX.md create mode 100644 docs/admin/INDEX.md create mode 100644 docs/devs/INDEX.md create mode 100644 docs/users/INDEX.md diff --git a/.gitea/issue_template/bug-report.yaml b/.gitea/issue_template/bug-report.yaml new file mode 100644 index 0000000..a7fef0b --- /dev/null +++ b/.gitea/issue_template/bug-report.yaml @@ -0,0 +1,35 @@ +--- +name: Bug report +about: File a bug report. +body: + - type: textarea + id: app-and-os-details + attributes: + label: What OS, deployment type and application version do you use? + placeholder: Bunker v0.1.2 on Rocky Linux 9, deployed via Docker + validations: + required: true + - type: textarea + id: what-happened + attributes: + label: What happened? + placeholder: Tell us what you see! + validations: + required: true + - type: textarea + id: what-expected + attributes: + label: What you expect to happen? + placeholder: Describe your expectations. + validations: + required: true + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to these things + options: + - label: I have read the "Submitting issues" section in [CONTRIBUTING.md](https://code.pztrn.name/apps/bunker/src/branch/main/CONTRIBUTING.md) and done everything requested. + required: true + - label: I have visited [Telegram chat](https://t.me/bunker_app_chat_eng) and asked for assistance. + required: true diff --git a/.gitea/issue_template/feature-request.yaml b/.gitea/issue_template/feature-request.yaml new file mode 100644 index 0000000..69b4973 --- /dev/null +++ b/.gitea/issue_template/feature-request.yaml @@ -0,0 +1,21 @@ +--- +name: Feature request +about: File a request for additional feature. +body: + - type: textarea + id: feature-description + attributes: + label: Feature description + placeholder: Describe feature you need. + validations: + required: true + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to these things + options: + - label: I have read the "Submitting issues" section in [CONTRIBUTING.md](https://code.pztrn.name/apps/bunker/src/branch/main/CONTRIBUTING.md) and done everything requested. + required: true + - label: I have visited [Telegram chat](https://t.me/bunker_app_chat_eng) and asked for assistance. + required: true diff --git a/.gitea/workflows/on-push.yml b/.gitea/workflows/on-push.yml new file mode 100644 index 0000000..ce26c18 --- /dev/null +++ b/.gitea/workflows/on-push.yml @@ -0,0 +1,26 @@ +--- +name: "Linting and tests" +run-name: "Linting and tests" +on: + - push + +jobs: + Linting: + runs-on: "ubuntu-22.04" + steps: + - name: "checkout source" + uses: actions/checkout@v4 + - name: "lint" + uses: docker://code.pztrn.name/containers/go-toolbox:v5 + with: + command: "/usr/local/bin/task lint" + + Tests: + runs-on: "ubuntu-22.04" + steps: + - name: "checkout source" + uses: actions/checkout@v4 + - name: "tests" + uses: docker://code.pztrn.name/containers/go-toolbox:v5 + with: + command: "/usr/local/bin/task test" diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..34f7fce --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,4 @@ +{ + "line-length": false, + "first-line-h1": false +} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..996395b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +--- +repos: + - repo: https://code.pztrn.name/misc/pre-commit-hooks-golang + rev: cb3db89b1c4bee10eec85a7fa1dbbd35fb347478 + hooks: + - id: golangci-lint diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..6b530d2 --- /dev/null +++ b/.yamllint @@ -0,0 +1,13 @@ +--- +extends: default + +ignore: | + ./vendor + +rules: + line-length: disable + braces: + ignore: + - openapi.yaml + min-spaces-inside: 1 + max-spaces-inside: 1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..5e5ad30 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,97 @@ +# Contributing to Bunker + +Hey, developer/user! Please, read this file carefully before doing any contributions on Bunker. + +## Hello from Russia + +First of all, hello from Russia and thanks for stopping by. + +Lead developer of this project living in Yekaterinburg, Russia. If you're uncomfortable with it - please do not use Bunker and/or do not try to contribute to it. + +## Issues + +## Submitting issues + +Before submitting issues please make sure you: + +1. Searched for similar issues in tracker. +2. Asked [Telegram chat](https://t.me/bunker_app_chat_eng) for help and/or discussion of your issue. It is possible that your problem is a feature or need to be transformed in something else before filing issue in tracker. + +## Working on issues + +See The Flow below. + +## Developing Bunker + +### Copyright, licenses, DCOs + +Code is licensed under terms and conditions of GNU General Public License version 3. By submitting any portion of code via pull requests you accept that your code will be licensed under this license. + +By submitting code via Pull Request you should signoff it (via `--signoff` command line parameter to git). This will mean: + +1. You signing [DCO](DCO), meaning that code you submitted was really written by you and not copied from other software (especially with incompatible licensing). +2. You agree to transfer all rights on submitted code to [@pztrn](https://code.pztrn.name/pztrn). + +Non-signed-off pull requests won't be accepted. + +### Preparing your development environment + +First of all you should properly configure your development environment. + +Bunker is developed using VSCode with Go plugin, which utilises gopls and golangci-lint. Ensure linter is running before you commit anything to repositoryto save your time: + +- If you're using IDEA or IDEA-based products (like OpenIDE): use [pre-commit](https://pre-commit.com/) to run linter on git commit. It's configuration already added to repository. +- If you're on VSCode: configure linter to be run on whole workspace to see problems in near-realtime. Fix them before committing code. +- If you're on any other editor: you're on your own. As example you can take a look on [Sublime Text 4 as Golang IDE](https://wiki.pztrn.name/software/sublimetext/golang_ide_v4/) (russian) or use pre-commit hooks. + +### The always stable main nonsense + +We (and you) should try hard to keep code in main correct, so anyone should be able to checkout code from main branch, build it and deploy anywhere. + +### Selecting task to work on + +First of all, use Gitea's milestones to get epics list. For that filter for next version and use "task type/epic" label filter. Inside these epics you'll find tasks to work on. + +After selecting desired task head to Telegram chat and discuss it. There will be always some cases that you'll miss but other developers (or even users) might put your attention on. + +Same procedure should be applied to bugs you want to fix. Even if you found it. + +### Git branches types + +There are 3 branch types: + +1. `main` branch. Trying to keep always buildable and deployable. Only @pztrn is able to merge or commit here. +2. Feature branches. Named in form of `feature/TASKID_feature_name`, e.g. `feature/2_cicd` or `feature/123_tasks`. These branches created for working on couple of tasks and you should create personal branches from it. Only @pztrn is able to merge or commit here. +3. Personal branch. These branches located in your personal fork, from these branches you're making merge requests. + +### The Flow + +Bunker uses own flow that can be described like that: + +- Before starting developing something go to [Telegram chat](https://t.me/bunker_app_chat_eng) and discuss your ideas with others. +- After discussion an issue must be created in issue tracker. All merge requests should be sticked to one or more tasks in it. +- Create merge requests early, so other developers and involved users can review you code at any point of time. Follow merge requests template as much as possible and describe your work with as much words as possible. +- Give commits meaningful descriptions. It can be short, like `implement feature X for Y`, or `linting` (if this commit is only about linting), and can be repeated (if you're kind-of ADHD and forgot to fix linting issues on some files while fixing linting issues in others), but it still should be meaningful. +- Rebase on main or merge it in your branch before calling people to review your code. +- Your branch should not contain any code that isn't belonging to feature you implement or bug you fix. +- CI pipeline for linting and tests should pass. Do not call for review if your pipeline failed. + - Of course, there might be exceptions, e.g. you can't understand why it failing. Head to chat to discuss this situation and request for help. +- Everything should be covered with documentational changes in `docs` directory, if needed. +- @pztrn approve is required to merge. Deal with it for now. This can be changed in future. +- Merge requests will be automatically squashed in one commit on merging, giving full information about merge request in this commit. + +Git flow can be described like that: + +1. Clone Bunker to your account. +2. Checkout your branch from main branch (or feature branch if specified in task). +3. Write some code and push it to your copy. Don't forgen about documentational changes if needed. +4. Create merge request into main repository. Follow merge request template as close as possible. Select proper branch (main or feature branch). +5. Reiterate 3 and 4 as long as needed. +6. Ensure your branch gen be merged in destination. Rebase/merge target in your branch if needed. +7. Call developers to review your code. +8. If needed, reiterate 3-7 until code is feature complete, CI is green, no objections left in merge request discussions and @pztrn approve is gathered. +9. Ping @pztrn every day until he merges. + +--- + +*These rules can be changed in any time without further notice.* diff --git a/DCO b/DCO new file mode 100644 index 0000000..b348588 --- /dev/null +++ b/DCO @@ -0,0 +1,33 @@ +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. diff --git a/README.md b/README.md new file mode 100644 index 0000000..16faec6 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# Bunker + +An Ultimate family app that covers absolute maximum of every family or company needs. + +For planned features see [ROADMAP.md](ROADMAP.md). This list is, of course, completely incomplete and new features might be added anytime. + +## Documentation + +Head to [docs](docs/INDEX.md) directory to read about installing Bunker, it's usage and other documentational things. + +## Get help and discuss Bunker + +If you want to get help with Bunker or to duscuss it you can head to [Telegram chat](https://t.me/bunker_app_chat_eng) (english only please). + +**Do not post help requests in issues tracker - they will be closed without reaction! Discuss your problem or feature request in Telegram first!** + +## Developing Bunker + +Read [documentation for developers](CONTRIBUTING.md) for developing rules. diff --git a/ROADMAP.md b/ROADMAP.md new file mode 100644 index 0000000..cc9c84e --- /dev/null +++ b/ROADMAP.md @@ -0,0 +1,173 @@ +# Bunker roadmap + +This file contains features that is planned to be implemented in Bunker. This isn't a really complete list, but should give you a direction what to expect on every major version. Features might be added, expelled, transferred to another version at any time. + +Every major version can split in several minor versions and planned features can be designated partially to minor versions. E.g. version 0.1.0 can contain only network interaction, installer and users/roles management, version 0.1.1 can contain only tasks management, and so on. + +To keep tracker clean tasks will be created only when version developing will be started. Exception provided only for features requested by users. Also keep in mind that one feature might be splitted in several tasks. + +## Version 0.1.0 + +This is a first working version with task management. + +* Basics: + * [ ] Support for Desktop (Windows, Linux, macOS) and mobiles (Android, iOS). + * [ ] Translated interface. + * [ ] Ability to log in to server. + * [ ] Installator built-in to client. Ability to start installation procedure using token from server's logs. + * [ ] Websockets communication between client and server while client is started. +* Admin interface: + * [ ] Basic users manipulation - create, update metadata, block, unblock. + * [ ] Basic audit - keeping information about users actions and showing it on user's page. +* Audit: + * [ ] Show audit events for users on their pages in admin panel. + * [ ] Separate page for audit events. +* Comments: + * [ ] Comments CRUD. + * [ ] Reactions for comments. + * [ ] Comments audit events: comment creation/deletion/editing. +* File server: + * [ ] Simple interface for showing one file (text, image, video, audio). + * [ ] Public link file sharing. + * [ ] File access counter. +* Linker: + * [ ] Basic linker with support for bunker:// protocol and ability to open external links. +* Notifications: + * [ ] Simple notifications center. +* Projects: + * [ ] Projects administration interface with ability to add any entity to it (tasks and users currently, notes, chats, etc. in future). + * [ ] Project metadata: name, description, links (both internal and external ones), involved people. + * [ ] Project audit events: project creation/deletion, people adding/expelling. +* RBAC: + * [ ] Basic RBAC - code looks at rights, users and rights added to roles. + * [ ] RBAC audit events: role creation/deletion, user to role addition/expelling. +* Tasks: + * [ ] Tasks CRUD. + * [ ] Repeatable tasks: every day, week with dow, month (both exact day and dow, e.g. "on every 13 day" or "every third sunday"). + * [ ] Tasks metadata: name, description, status, due date, attached files, comments. + * [ ] Tasks audit events: task creation/updating/deletion. +* Users: + * [ ] Avatars. + * [ ] Recording and showing last activity. + * [ ] Supported metadata: phone numbers, emails, nickname, addresses. + * [ ] Audit events: log in, log out, metadata update. + * [ ] Pluggable authentication mechanisms: support for local database and LDAP. + +## Version 0.2.0 + +Chats appears, pretty basic and local-only. Notifications improvements. + +* Chats: + * [ ] 1-on-1 and group chats. + * [ ] Sending and receiving text messages. + * [ ] Media files (audio, video, gifs) sending and showing. + * [ ] History loading and server-side searching. + * [ ] Reactions on messages. + * [ ] Threads. + * [ ] Chats metadata: name, description. + * [ ] Audit events: chats creation, deletion, metadata update. +* Notifications: + * [ ] Support for push messages on Android/iOS. +* Roster: + * [ ] Basic roster with only "Local users" group available, which represents all users registered on server. + * [ ] Local users group name configuration in administration interface. + * [ ] Ability to add description to user that is visible only to user who added it. +* Tasks: + * [ ] Support for push notifications about tasks deadlines. +* Users: + * [ ] LDAP groups filtering for putting all users in that group in "Local users" roster group. + +## Version 0.3.0 + +Chats, projects, tasks improvements. + +* Chats: + * [ ] Audio/video calls. +* Projects: + * [ ] Milestones: ability to assign any entity to specified milestone (e.g. chat room for milestone discussion, tasks, files, etc.). +* Tasks: + * [ ] Custom fields for tasks. + * [ ] Tasks audit events: create/update/delete custom fields. + +## Version 0.4.0 + +Completion of PIM features and Markdown support. + +* Calendar: + * [ ] Calendar events CRUD. + * [ ] Calendar audit events: create/update/delete events. + * [ ] CalDAV support for controlling it's data via calendar apps on end-user devices. +* Chats: + * [ ] Markdown support. +* Comments: + * [ ] Markdown support. +* Email: + * [ ] Implement email server according to RFCs. + * [ ] Support for milters (e.g. for injecting rspamd in mails validation and verification process). + * [ ] Support for email identification, verification and security things (DMARC, DKIM). + * [ ] Client interface for reading/writing/sending emails. +* Notes: + * [ ] Notes CRUD. + * [ ] Markdown support. + * [ ] Notes audit events: note creation/deletion/updating. + * [ ] Comments for notes. +* Projects: + * [ ] Ability to attach notes and calendar events to projects. + * [ ] Markdown support for project description. +* Tasks: + * [ ] CalDAV support (limited, according to RFCs), read-only. + * [ ] Markdown support. +* Roster: + * [ ] Ability to add external contacts like in phonebook. + * [ ] CardDAV for every contact in roster. +* Users: + * [ ] Markdown support in some fields like description. + +## Version 0.5.0 + +Federation and roster improvements. + +* Calendar: + * [ ] Federate calendar events creation/updating/deletion events when contact from remote server is participating in event. +* Chats: + * [ ] Federate 1-on-1, groups chats, video calls. +* Comments: + * [ ] Federate comments. +* File server: + * [ ] Federate file sharing. +* Federation: + * [ ] Implement federation protocol. +* Projects: + * [ ] Federate projects changes to all participants. +* RBAC: + * [ ] Federate RBAC changes to all participants. +* Roster: + * [ ] Ability to add custom groups and put contacts in it. +* Tasks: + * [ ] Federate tasks and it's changes based on project participation. +* Users: + * [ ] Federate users metadata changes (avatars, names, etc.). + +*Note that there is no federation entry for emails, well, because they're already federated*. + +## Version 0.6.0 + +Kind-of-social features appears, as well as forums. + +* Forums: + * [ ] Forums CRUD. + * [ ] RBAC support for moderation and posting. + * [ ] Forums federation and instance-only forums. + * [ ] Notifications about new posts and comments. +* Stories: + * [ ] Ability to post stories. + * [ ] Stories federation to external contacts in roster. + * [ ] Stories comments. + * [ ] Notifications about new stories. + * [ ] Notifications about comments to posted stories or stories user already involved into (reacted or commented). + +## Version 1.0.0 + +First feature-complete version. + +Tasks for this version yet to be discussed. diff --git a/docs/INDEX.md b/docs/INDEX.md new file mode 100644 index 0000000..15c6d67 --- /dev/null +++ b/docs/INDEX.md @@ -0,0 +1,8 @@ +# Bunker docs + +Welcome to Bunker documentation place. + +* [Administrator's documentaion](admin/INDEX.md) - how to build, run, administer your Bunker instance. +* [User's documentation](users/INDEX.md) - how to use your Bunker. + +Developers must consult with [developers documentaion](devs/INDEX.md) on how to configure your IDE/editor for developing. Also, there is a short [developing doc](../CONTRIBUTING.md) for everybody who wants to be involved in Bunker development. diff --git a/docs/admin/INDEX.md b/docs/admin/INDEX.md new file mode 100644 index 0000000..80dee58 --- /dev/null +++ b/docs/admin/INDEX.md @@ -0,0 +1 @@ +# Administrator's documentation diff --git a/docs/devs/INDEX.md b/docs/devs/INDEX.md new file mode 100644 index 0000000..7ede939 --- /dev/null +++ b/docs/devs/INDEX.md @@ -0,0 +1 @@ +# Developer's documentation diff --git a/docs/users/INDEX.md b/docs/users/INDEX.md new file mode 100644 index 0000000..ea3bc1b --- /dev/null +++ b/docs/users/INDEX.md @@ -0,0 +1 @@ +# User's documentation