How vilelacc/telecep works
TeleCEP is a Telegram chatbot for Brazilian postal-code lookups. Users start /cep to enter a CEP and receive its address, or /addr to choose a state, enter a city and street, and receive one or more matching CEPs. The bot also provides start, about, and bug-support replies. The address flow validates its inputs before searching; both lookup helpers query ViaCEP, with cached HTTP clients. The sampled source supports these calls and dispatches; broader runtime wiring is not inferred.
Main entry points: bot.js Bot commands · addr.wizard.scene.js Address lookup flow · messages.default.js About and support text · zip.code.wizard.scene.js CEP lookup flow
Components 11
Telegram interface
- Bot commands
src/bot.js - About and support text
src/helpers/messages.default.js
Lookup flows
- CEP lookup flow
src/wizards/zip.code.wizard.scene.js - Address lookup flow
src/wizards/addr.wizard.scene.js - Federative units
src/helpers/federative.units.js
Lookup services
- Address validation
src/helpers/data.validation.js - Search by CEP
src/helpers/search.by.zip.code.js - Search by address
src/helpers/search.by.address.js
Other components
- Telegram user
- ViaCEP API
- Project metadata
package.json
Connections 12
- Telegram user → Bot commands: sends commands
- Bot commands → Telegram user: replies
- Bot commands → CEP lookup flow: enters /cep
- Bot commands → Address lookup flow: enters /addr
- Bot commands → About and support text: uses replies
- About and support text → Project metadata: reads version and author
- Address lookup flow → Federative units: offers states
- Address lookup flow → Address validation: validates input
- Address lookup flow → Search by address: searches address
- CEP lookup flow → Search by CEP: searches CEP
- Search by CEP → ViaCEP API: requests CEP data
- Search by address → ViaCEP API: requests address data