# Application Structure

MERNKIT was scaffolded using "create-react-app". The frontend is based on the free Material-UI theme Devias Kit and leverages Material-UI components for fast prototyping with a consistent design scheme. Lazy loading is implemented where it makes sense. Folders are in CAPS.&#x20;

* SRC
  * Index.js (entry point).
  * App.js (Main App).&#x20;
  * Routes.js (Routes for MERNKIT)&#x20;
    * Routes are wrapped in either the "Minimal" or "Main" layouts.&#x20;
    * "Minimal" is used for pages that don't require navigation like login, signup, password reset, etc.&#x20;
  * .env (Environmental Variables for Development)
  * .env.production (Environmental Variables for Production)
    * THEME
      * Configuration for material-ui theme provider
    * &#x20;PAGES
      * Top level .js files are the containers for each view within MERNKIT.&#x20;
        * COMPONENTS
          * PAGENAME
            * Components that makeup pages that are not reusable.&#x20;
    * LAYOUT
      * Layout wrappers "Main" and "Minimal" for routes as described above.&#x20;
    * COMMON
      * CONTEXT
        * Authentication Context for managing authentication state throughout the app
      * HOOKS
        * alertbar-hook.js - used for tracking state for in app notifications
        * auth-hook.js - used for tracking authentication state within the auth-context.&#x20;
        * confirmemail-hook.js - tracks state for confirmation emails
        * form-hook.js - hook for form state
        * http-hook.js - wrapper for fetch API.&#x20;
        * permission-hook.js - hook to manage permission state.&#x20;
      * UI
        * Reusable UI components like AlertBar, ErrorModal, and LoadingSpinner.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mernkit.com/front-end/untitled.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
