Initial commit: ROA2WEB - FastAPI + Vue.js + Telegram Bot

Modern ERP Reports Application with microservices architecture

Tech Stack:
- Backend: FastAPI + python-oracledb (Oracle DB integration)
- Frontend: Vue.js 3 + PrimeVue + Vite
- Telegram Bot: python-telegram-bot + SQLite
- Infrastructure: Shared database pool, JWT authentication, SSH tunnel

Features:
- FastAPI backend with async Oracle connection pool
- Vue.js 3 responsive frontend with PrimeVue components
- Telegram bot alternative interface
- Microservices architecture with shared components
- Complete deployment support (Linux Docker + Windows IIS)
- Comprehensive testing (Playwright E2E + pytest)

Repository Structure:
- reports-app/ - Main application (backend, frontend, telegram-bot)
- shared/ - Shared components (database pool, auth, utils)
- deployment/ - Deployment scripts (Linux & Windows)
- docs/ - Project documentation
- security/ - Security scanning and git hooks
This commit is contained in:
2025-10-25 14:55:08 +03:00
commit 6b13ffa183
237 changed files with 70035 additions and 0 deletions

View File

@@ -0,0 +1,101 @@
import { createRouter, createWebHistory } from "vue-router";
import { useAuthStore } from "../stores/auth";
// Import views
import LoginView from "../views/LoginView.vue";
import DashboardView from "../views/DashboardView.vue";
import InvoicesView from "../views/InvoicesView.vue";
import BankCashRegisterView from "../views/BankCashRegisterView.vue";
import TelegramView from "../views/TelegramView.vue";
const routes = [
{
path: "/",
redirect: "/dashboard",
},
{
path: "/login",
name: "Login",
component: LoginView,
meta: {
requiresAuth: false,
title: "Autentificare - ROA Reports",
},
},
{
path: "/dashboard",
name: "Dashboard",
component: DashboardView,
meta: {
requiresAuth: true,
title: "Dashboard - ROA Reports",
},
},
{
path: "/invoices",
name: "Invoices",
component: InvoicesView,
meta: {
requiresAuth: true,
title: "Facturi - ROA Reports",
},
},
{
path: "/bank-cash-register",
name: "BankCashRegister",
component: BankCashRegisterView,
meta: {
requiresAuth: true,
title: "Registru Casa si Banca - ROA Reports",
},
},
{
path: "/telegram",
name: "Telegram",
component: TelegramView,
meta: {
requiresAuth: true,
title: "Telegram Bot - ROA Reports",
},
},
{
path: "/:pathMatch(.*)*",
name: "NotFound",
redirect: "/dashboard",
},
];
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes,
linkActiveClass: "router-link-active",
linkExactActiveClass: "router-link-exact-active",
});
// Navigation guards
router.beforeEach((to, from, next) => {
const authStore = useAuthStore();
// Set page title
if (to.meta.title) {
document.title = to.meta.title;
}
// Check authentication
if (to.meta.requiresAuth !== false && !authStore.isAuthenticated) {
// Redirect to login if not authenticated
next("/login");
} else if (to.path === "/login" && authStore.isAuthenticated) {
// Redirect to dashboard if already authenticated and trying to access login
next("/dashboard");
} else {
next();
}
});
router.afterEach((to) => {
// Scroll to top after navigation
window.scrollTo(0, 0);
});
export default router;