How nixahams/nixahams-website works
Project type and purpose
• This is a Single-Page Application (SPA) built in Vue.js for the Nixa Amateur Radio Club website.
• It serves both public-facing pages (information, announcements, hamfest registration, contact) and an admin console (to edit content, manage users, announcements, meetings, nets, repeaters, etc.).
• Although the repository contains only the front-end code, it clearly integrates with a back-end API (for authentication, content storage, purchase verification) and a database.
File structure
• Top level:
• Dockerfile, vue.config.js, vite.config.js → build and deployment
• src/ → main application code
• public/, index.html → static entry point
• .env.development/.env.production → environment variables for API endpoints, keys
• src/ breakdown:
• src/main.js + App.vue → Vue app bootstrap
• src/router/ → route definitions (index.js + domain-specific routers: admin.js, hamfest.js, nets.js)
• src/stores/ → Vuex (or Pinia) stores for global state (announcements, officers, users)
• src/utils/ → shared utilities (axiosClient for API calls, dateUtils)
• src/components/ → reusable UI components
• src/pages/ → public-facing route components (grouped by feature: Account, Hamfest, etc.)
• src/admin/ → admin console UI (components, pages, edit sub-pages)
• Config files (babel.config.js, jsconfig.json, package.json) define build pipeline, aliases, dependencies.
README for additional insights
• Built with Node.js (v16.x), Vue.js, Bootstrap, jQuery
• Features: admin page, page editing, backend for verification, database storage
• No in-repo back-end code, implying an external API service.
a. Main components:
– Client (Browser) running the Vue.js SPA
– Static Web Server / CDN (serving index.html, bundled JS/CSS, assets)
– Back-end API Service (Node.js/Express or similar)
– Database (e.g., MongoDB / PostgreSQL)
– External Services (e.g., Payment/Gateway for hamfest purchases, Email/SMS for notifications)
b. Relationships and interactions:
– Browser GETs static files from CDN → renders SPA
– SPA uses vue-router to handle URL routes (public vs admin)
– On user action, SPA calls API via axiosClient (REST endpoints)
– API service authenticates user, CRUDs content in the database
– For payments, API interacts with Payment Provider and updates DB
c. Architectural patterns and principles:
– Component-based UI (Vue components, pages, admin modules)
– Single-Page routing (vue-router with split routes for admin/public/hamfest)
– State management (Vuex stores for announcements, officers, users)
– 12-factor config (env vars for endpoints)
– Containerization (Dockerfile) and static build (vite/vue-cli)
d. Key technologies/frameworks:
– Vue.js (SPA framework), Vue Router, Vuex (state store)
– Axios (HTTP client, configured in src/utils/axiosClient.js)
– Bootstrap + custom CSS (src/assets/styles)
– Node.js (build/runtime for API, though not in this repo)
– Docker (container builds), Vite / vue-cli for bundling
Essential details to capture
• Separation of concerns: build artifacts vs dynamic data
• The SPA’s client-side routing vs server-side API endpoints
• Shared state via stores and cross-cutting utilities
• Deployment concerns (Docker container vs static asset hosting)
• Environment configurations driving API URLs