How sandeshprasai/smartinvoice works
Project Type and Purpose
• This is a full-stack MEVN (MongoDB, Express, Vue, Node) cloud-based invoicing application (“Smart Invoice”).
• Frontend: Vue.js SPA for user authentication, dashboard, invoice CRUD, PDF download.
• Backend: Express.js REST API, MongoDB persistence, OTP & email workflows, scheduled tasks, file-upload handling.
File Structure Analysis
• Top-level folders:
• Backend/ – Express app source
• vue-frontend/ – Vue.js client
• Backend substructure:
• config/db.js – Mongo connection config
• models/ – Mongoose schemas: users, invoices, OTPs
• routes/index.js – API entrypoints
• userController/ – Controllers for auth, invoice operations, OTP, reset flows
• util/ – Helpers (validation, OTP generation, mailSender, logger, PDF helper)
• scheduler.js – Cron job or periodic tasks
• uploads/ – Persisted invoice PDFs
• Frontend substructure:
• public/ – index.html
• src/ – Vue entry (main.js, App.vue), router.js, Pinia store, reusable components, pages (dashboard, login, signup, reset password)
• utills/ – token checker, PDF utilities
Key README Insights
• Emphasizes user authentication, invoice management, due-date tracking, discounts/shipping.
• Describes tech stack, setup steps, environment variables (.env).
• Backend modules: config/db.js, models, routes, controllers, utils, scheduler.
• Vue pages and components (LoginPage, Dash_Board, OtpInput).
• Flow: sign-up/login → receive OTP → JWT stored in Pinia → token validated on each API call.
• Where PDF utilities generate and download invoice files.