uprm-inso4101-2024-2025-s1 / semester-project-campus-resource-and-event-management

semester-project-campus-resource-and-event-management created by GitHub Classroom
9 stars 0 forks source link

Establish the Project File/Folder Structure #45

Closed JeanSanchezFelix closed 4 weeks ago

JeanSanchezFelix commented 1 month ago

Description:

We are transitioning the project to use Svelte for building the web application. The project needs to be organized following standard Svelte practices, which involve a clear separation of components, assets, and reusable libraries. The root structure should be Svelte-friendly and include necessary files like index.html, a src folder containing the application code, and structured subfolders for organization.

Requirements:

  1. Svelte Project Setup:

    • The root folder should contain index.html for the main entry point.
    • A src folder will house all application files, including Svelte components, assets, libraries, and entry point scripts.
  2. Components, Assets, and Lib Folders:

    • Components folder will store individual .svelte components.
    • Assets folder will store shared static assets like images and fonts.
    • Lib folder will contain reusable utilities or helper libraries.
  3. App Structure:

    • The root of the src folder will contain App.svelte as the main component, and main.js will handle the entry point to bundle the app.
  4. Flask Backend:

    • There shall be a folder on the root of the project called api/ and it shall contain a main.py file with a barebones flask server.

Expected Folder Structure:

/project-name
├── index.html                      # Main HTML entry point
├── /src                            # Source files folder
│   ├── /assets                     # Static assets like images, fonts, etc.
│   │   └── logo.png
│   ├── /components                 # Svelte components
│   │   ├── Header.svelte           # Header component
│   │   ├── Footer.svelte           # Footer component
│   │   └── Home.svelte             # Home component
│   ├── /lib                        # Utility libraries or helper functions
│   │   └── api.js                  # Example utility file
│   ├── App.svelte                  # Main application component
│   └── main.js                     # JavaScript entry point
├── package.json                    # Project dependencies and scripts
└── /api 
    └──  main.py                    # Main backend entry point

Additional Details:

Example Linkage in main.js:

import App from './App.svelte';

const app = new App({
    target: document.body
});

export default app;

Python flask backend setup

A test flask api endpoint that the frontend can access should be set up.

Acceptance Criteria:

This structure will help organize the Svelte-based project in a modular and scalable way, making it easier for team collaboration and future development.

Ojani commented 1 month ago

i replaced the difficulty from 3 to 2. It was a 3 to be honest, but I don't want to create a big point imbalance.