Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Production moved from on-prem VM 249 (10.22.68.249) to OVH VPS (57.128.200.27, inpi-vps-waw01). Updated ALL documentation, slash commands, memory files, architecture docs, and deploy procedures. Added |local_time Jinja filter (UTC→Europe/Warsaw) and converted 155 .strftime() calls across 71 templates so timestamps display in Polish timezone regardless of server timezone. Also includes: created_by_id tracking, abort import fix, ICS calendar fix for missing end times, Pros Poland data cleanup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.4 KiB
2.4 KiB
NordaBiz — Agent Instructions
Platform: katalog firm i networking dla Izby Gospodarczej Norda Biznes (Wejherowo). Production: https://nordabiznes.pl | Status: LIVE
Stack
- Backend: Flask 3.0, SQLAlchemy 2.0, Python 3.9+, PostgreSQL
- Frontend: HTML5, CSS3, Vanilla JS, Jinja2
- AI: Google Gemini 3 Flash (free tier) — moduł NordaGPT
- Security: Flask-Login, Flask-WTF (CSRF), Flask-Limiter
Project Structure
app.py # Main Flask app (routes, auth, API)
database.py # SQLAlchemy models (Company, User, Chat, Forum...)
gemini_service.py # Google Gemini AI integration
nordabiz_chat.py # AI chat engine with company context
search_service.py # Unified SearchService (synonyms, FTS, fuzzy)
blueprints/ # 17 Flask blueprints (modular routes)
templates/ # Jinja2 templates
static/ # CSS, JS, images
database/ # SQL schemas, migrations
scripts/ # Python/Node.js utilities
tests/ # Unit + integration tests
Key Conventions
- Slug format: kebab-case, e.g.
pixlab-sp-z-o-o - NIP: 10 digits, no dashes | REGON: 9 or 14 digits | KRS: 10 digits (companies only)
- Categories:
IT,Construction,Services,Production,Trade,Other - Data quality levels:
basic,enhanced,complete
Database
- Dev: PostgreSQL via Docker (
localhost:5433/nordabiz) - Prod: PostgreSQL on 57.128.200.27:5432 (OVH VPS inpi-vps-waw01, localhost from server)
- After creating tables:
GRANT ALL ON TABLE ... TO nordabiz_app - After creating sequences:
GRANT USAGE, SELECT ON SEQUENCE ... TO nordabiz_app
Running Locally
docker compose up -d # Start PostgreSQL
python3 app.py # Start Flask (port 5000 or 5001)
Tests
pytest tests/ -v # All tests
pytest tests/unit/ -v # Unit tests (no DB)
pytest tests/integration/ -v # Integration tests (with DB)
Jinja2 Templates — IMPORTANT
{% block extra_js %} in base.html is INSIDE a <script> tag — do NOT add your own <script> tags inside it.
Code Style
- Polish language for user-facing strings, English for code/comments
- No unnecessary abstractions — keep it simple
- Security first: never hardcode API keys, always use
.env - Validate at system boundaries only