Skip to content

Project Structure

Edward edited this page Nov 21, 2024 · 3 revisions

The project is organized into the following folders and files:


Core Directories

src/

The source files for the project. This folder contains all the app's essential logic and front-end components.

  1. assets/

    • Contains static assets like CSS files, images, or fonts.
  2. components/

    • Global components that can be reused across views (e.g., Search.vue).
  3. electron/

    • main.js: Initializes the Electron app and connects it to the database.
    • database.js: Manages SQLite connections and provides methods to query the database.
    • preload.js: Exposes a secure API to the renderer process, preventing direct access to backend functions.
  4. router/

    • Contains the routing logic to switch between different views (index.js).
  5. views/

    • Holds page-specific .vue files that define the HTML, JavaScript, and CSS for each route.
  6. App.vue

    • The root component of the Vue application.
  7. main.js

    • Initializes the Vue application and mounts it to the DOM.

datatables/

  • Contains CSV files that serve as data tables for the SQLite database.

Build and Deployment

dist/

  • Contains the production-ready build of the app after running npm run build. This is what is deployed to users.

node_modules/

  • Automatically generated by npm install. Holds all project dependencies. Excluded from version control (.gitignore).

Configuration and Metadata

public/

  • Contains the index.html template used by Vite to build the app.

.gitignore

  • Specifies files and folders to be excluded from version control.

package.json

  • Defines metadata, dependencies, and scripts for managing the project.

package-lock.json

  • Automatically generated by npm. Ensures consistent dependency resolution across environments.

vite.config.js

  • Configures the Vite build tool.

Database and Data

DMS-Project.sqlite

  • The SQLite database containing project data.

datatables/

  • Stores raw data in CSV format that populates the database.

Documentation

README.md

  • The project’s main documentation file, displayed on the GitHub repository’s home page.

Summary

This structure provides a clear and concise overview of the project. Files and folders have been grouped by functionality, with connections between components explained to improve navigation for new contributors.