Repository navigation
Where does a new rule or bot screen go, so that the bot and the API both get it? #595
Answered
by
lumenpearson
lumenpearson
asked this question in
Q&A
|
I want to add something to running a class: a new check and a new screen under «⚙️ Класс». Where does each piece go so that a phone calling the API gets the same rule as the bot? |
Answered by
lumenpearson
Oct 17, 2026
Replies: 1 comment
|
Applies to: any version — this is how the project works by design. The rule goes in
More: https://github.com/lumenpearson/lessons/blob/main/docs/architecture.md#the-service-layer-and-why-the-phone-does-not-log-in and https://github.com/lumenpearson/lessons/blob/main/CONTRIBUTING.md#rules-that-may-not-be-broken |
0 replies
Answer selected by
lumenpearson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Applies to: any version — this is how the project works by design.
The rule goes in
server/app/services/; the bot and API are thin shells over it.services/manage/<screen>.py, doing the check, write and audit. A refusal is an exception carrying facts, not a sentence — chat: a sentence; wire: a status code anddetail. Shared wording is inserver/app/wording.py.services/may importapp.bot,app.api,app.rpcorapp.rest, even indirectly;server/tests/test_service_layering.pyfinds the breaking chain.server/app/bot/handlers/manage/; router order follows__init…