mirror of
https://github.com/marcogll/telegram_expenses_controller.git
synced 2026-01-13 13:25:15 +00:00
Merge pull request #1 from marcogll/feat-initial-project-structure-14463650289909895681
Initial Project Structure for Expense Tracker
This commit is contained in:
12
.env.example
Normal file
12
.env.example
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Telegram
|
||||||
|
TELEGRAM_BOT_TOKEN=
|
||||||
|
|
||||||
|
# OpenAI
|
||||||
|
OPENAI_API_KEY=
|
||||||
|
|
||||||
|
# Google Cloud
|
||||||
|
GOOGLE_APPLICATION_CREDENTIALS=
|
||||||
|
SPREADSHEET_ID=
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
ENV=dev
|
||||||
114
.gitignore
vendored
Normal file
114
.gitignore
vendored
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.nox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# celery beat schedule file
|
||||||
|
celerybeat-schedule
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak
|
||||||
|
venv.bak
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
.dmypy.json
|
||||||
|
dmypy.json
|
||||||
|
|
||||||
|
# Pyre type checker
|
||||||
|
.pyre/
|
||||||
5
config/keywords.csv
Normal file
5
config/keywords.csv
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
keyword,categoria_principal,subcategoria,tipo_gasto_default
|
||||||
|
monitor,Tecnología,Equipo de Cómputo,negocio
|
||||||
|
croquetas,Personal,Mascotas,personal
|
||||||
|
hosting,Tecnología,Dominios y Hosting,negocio
|
||||||
|
libro,Educación,Libros y Material,negocio
|
||||||
|
6
config/providers.csv
Normal file
6
config/providers.csv
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
provider_name,aliases,categoria_principal,subcategoria,tipo_gasto_default
|
||||||
|
Amazon,"amazon,amzn,amazon mx",Por Determinar,Compras en Línea,
|
||||||
|
Office Depot,"officedepot,office",Administración,Suministros de oficina,negocio
|
||||||
|
Uber Eats,"ubereats,uber",Personal,Comida a domicilio,personal
|
||||||
|
GoDaddy,"godaddy",Tecnología,Dominios y Hosting,negocio
|
||||||
|
Cinepolis,"cinepolis",Personal,Entretenimiento,personal
|
||||||
|
8
config/user_config.json
Normal file
8
config/user_config.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"user_name": "Marco Gallegos",
|
||||||
|
"rfc": "GAMM910513CW6",
|
||||||
|
"regimen_fiscal_default": "612 - Persona Física con Actividad Empresarial y Profesional",
|
||||||
|
"moneda_default": "MXN",
|
||||||
|
"pais": "MX",
|
||||||
|
"timezone": "America/Mexico_City"
|
||||||
|
}
|
||||||
7
requirements.txt
Normal file
7
requirements.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fastapi
|
||||||
|
python-telegram-bot
|
||||||
|
openai
|
||||||
|
google-api-python-client
|
||||||
|
pydantic
|
||||||
|
uvicorn
|
||||||
|
python-dotenv
|
||||||
0
src/__init__.py
Normal file
0
src/__init__.py
Normal file
0
src/data_models.py
Normal file
0
src/data_models.py
Normal file
21
src/main.py
Normal file
21
src/main.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
from fastapi import FastAPI, Request
|
||||||
|
import logging
|
||||||
|
|
||||||
|
# Configure logging
|
||||||
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
app = FastAPI()
|
||||||
|
|
||||||
|
@app.get("/")
|
||||||
|
async def root():
|
||||||
|
return {"message": "Expense Tracker API is running."}
|
||||||
|
|
||||||
|
@app.post("/process-expense")
|
||||||
|
async def process_expense(request: Request):
|
||||||
|
"""
|
||||||
|
Receives expense data from n8n, logs it, and returns a confirmation.
|
||||||
|
"""
|
||||||
|
payload = await request.json()
|
||||||
|
logger.info(f"Received expense data: {payload}")
|
||||||
|
return {"status": "received", "data": payload}
|
||||||
0
src/modules/__init__.py
Normal file
0
src/modules/__init__.py
Normal file
0
src/modules/ai_agents.py
Normal file
0
src/modules/ai_agents.py
Normal file
0
src/modules/config_loader.py
Normal file
0
src/modules/config_loader.py
Normal file
0
src/modules/data_manager.py
Normal file
0
src/modules/data_manager.py
Normal file
0
src/modules/input_handler.py
Normal file
0
src/modules/input_handler.py
Normal file
0
src/prompts/analyst_prompt.txt
Normal file
0
src/prompts/analyst_prompt.txt
Normal file
0
src/prompts/auditor_prompt.txt
Normal file
0
src/prompts/auditor_prompt.txt
Normal file
Reference in New Issue
Block a user