diff --git a/docs/.github/dependabot.yml b/docs/.github/dependabot.yml new file mode 100644 index 0000000..ff1a325 --- /dev/null +++ b/docs/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: bundler + directory: / + schedule: + interval: daily + allow: + - dependency-type: direct diff --git a/docs/.github/workflows/ci.yml b/docs/.github/workflows/ci.yml new file mode 100644 index 0000000..89b1b04 --- /dev/null +++ b/docs/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: CI + +on: + push: + branches: ["main"] + pull_request: + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' # Not needed with a .ruby-version file + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + cache-version: 0 # Increment this number if you need to re-download cached gems + - name: Build with Jekyll + run: bundle exec jekyll build diff --git a/docs/.github/workflows/pages.yml b/docs/.github/workflows/pages.yml new file mode 100644 index 0000000..f175116 --- /dev/null +++ b/docs/.github/workflows/pages.yml @@ -0,0 +1,62 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# Sample workflow for building and deploying a Jekyll site to GitHub Pages +name: Deploy Jekyll site to Pages + +on: + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' # Not needed with a .ruby-version file + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + cache-version: 0 # Increment this number if you need to re-download cached gems + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Build with Jekyll + # Outputs to the './_site' directory by default + run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" + env: + JEKYLL_ENV: production + - name: Upload artifact + # Automatically uploads an artifact from the './_site' directory by default + uses: actions/upload-pages-artifact@v3 + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/docs/.gitignore b/docs/.gitignore index c1422f1..f9f1d49 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,10 +1,15 @@ -# Jekyll +# Not sure what a .gitignore is? +# See: https://git-scm.com/docs/gitignore + +# These are directly copied from Jekyll's first-party docs on `.gitignore` files: +# https://jekyllrb.com/tutorials/using-jekyll-with-bundler/#commit-to-source-control + +# Ignore the default location of the built site, and caches and metadata generated by Jekyll _site/ .sass-cache/ .jekyll-cache/ .jekyll-metadata + +# Ignore folders generated by Bundler .bundle/ vendor/ - -# Ruby -Gemfile.lock diff --git a/docs/Charity_Food_Bank_App_Core_Functionality.md b/docs/Charity_Food_Bank_App_Core_Functionality.md deleted file mode 100644 index 5b6397b..0000000 --- a/docs/Charity_Food_Bank_App_Core_Functionality.md +++ /dev/null @@ -1,70 +0,0 @@ - -# Charity Food Bank App - Core Functionality - -This document outlines the core functionality of the Charity Food Bank App, focusing on the MVP (Minimum Viable Product) features and their implementation. - -## Core Functionalities - -### 1. Inventory Management -- **Item Tracking**: Add, update, and delete inventory items (e.g., food, supplies). -- **Stock Levels**: Monitor stock levels and set alerts for low inventory. -- **Categories**: Organize items by categories (e.g., canned goods, perishables, hygiene products). -- **Check-In/Check-Out**: Record incoming donations and outgoing distributions. -- **Reporting**: Generate inventory reports (e.g., weekly, monthly summaries). - -### 2. Volunteer Scheduling and Planning -- **Shift Management**: Create and manage volunteer shifts. -- **Volunteer Profiles**: Maintain a database of volunteer contact info, availability, and skills. -- **Sign-Up Portal**: Allow volunteers to sign up for available shifts. -- **Notifications**: Send shift reminders or alerts via email/SMS. - -### 3. Client/Recipient Management -- **Client Records**: Store basic details of individuals or families receiving aid. -- **Service Logs**: Track services provided to clients over time. -- **Appointment Scheduling**: Allow clients to book appointments for food pickups or services. - -### 4. Administrative Features -- **User Roles**: Admins (full access) vs. Volunteers (restricted access). -- **Reporting**: Visualize key metrics (e.g., number of clients served, volunteer hours). -- **Announcements**: Post updates for volunteers or clients (e.g., closures, events). - -### 5. Donation Tracking -- **Donor Records**: Track donors and donation history. -- **Financial Contributions**: Optionally manage financial donations. -- **Donation Needs**: Highlight priority items for donation. - -### 6. Communication Tools -- **Email Templates**: Pre-configured messages for donors, clients, and volunteers. -- **Group Messaging**: Notify specific groups (e.g., volunteers, clients) about urgent updates. - -## Future Considerations for Multi-Tenant Support -### Tenant-Specific Features -- **Data Segregation**: Ensure each charity's data is securely separated. -- **Custom Branding**: Allow each tenant to configure their own branding and settings. -- **Scalability**: Build APIs to support external integrations and high usage. - ---- - -## MVP Implementation Milestones - -### Milestone 1: Multi-Tenant Foundation -- **User Authentication and Role Management** -- **Tenant-Specific Data Segregation** - -### Milestone 2: Inventory Management -- **CRUD Operations for Inventory Items** -- **Basic Stock Level Alerts** - -### Milestone 3: Volunteer Scheduling -- **Shift Management and Volunteer Profiles** -- **Volunteer Sign-Up Portal** - -### Milestone 4: Client/Recipient Management -- **Client Records and Service Logs** -- **Basic Appointment Scheduling** - ---- - -## Project Goal -The goal of this app is to empower local charity food banks to better manage their resources, volunteers, and clients while building a scalable platform that can eventually serve multiple organizations with one code base. - diff --git a/docs/Charity_Food_Bank_App_Development_Roadmap.md b/docs/Charity_Food_Bank_App_Development_Roadmap.md deleted file mode 100644 index 41c6562..0000000 --- a/docs/Charity_Food_Bank_App_Development_Roadmap.md +++ /dev/null @@ -1,169 +0,0 @@ -# Charity Food Bank App - Development Roadmap - -This document outlines the development roadmap for the Charity Food Bank App, focusing on delivering an MVP (Minimum Viable Product) quickly and efficiently. - -## Development Phases and Milestones - -### Phase 1: Discovery and Planning (2-4 Weeks) -- **Define MVP Scope**: - - Core features: Inventory management, volunteer scheduling, and client tracking. - - Multi-tenant foundation: User roles, scoped data for each charity. -- **Technology Stack Selection**: - - Backend: Node.js, Express.js, Vite. - - Database: Subpabase. - - Frontend: Vue.js. - - Hosting: Netlify. - - Authentication: JWT-based authentication - Supabase. -- **Design the Data Model**: - - Define tables for charities (tenants), users, inventory, clients, and volunteers. -- **Wireframes and UI Design**: - - Create wireframes for essential screens (dashboard, inventory, volunteer schedules). - ---- - -### Phase 2: MVP Development - -#### Milestone 1: Multi-Tenant Foundation (4-6 Weeks) -- **Tenant Management**: - - Basic user registration and login (JWT-based authentication). - - Securely scope all data by tenant (e.g., charity ID). -- **Role-Based Access Control**: - - Admin and Volunteer roles. -- **Core Dashboard**: - - Display summary metrics (inventory levels, scheduled shifts, clients served). - -#### Milestone 2: Inventory Management Module (4-6 Weeks) -- **Item CRUD Operations**: - - Add, update, and delete inventory items. -- **Categorization**: - - Support basic categories (e.g., canned goods, perishables). -- **Stock Levels**: - - Display current stock with low-inventory alerts. -- **Donations**: - - Record and track incoming donations. -- **Basic Reporting**: - - Generate inventory summaries (CSV or PDF). - -#### Milestone 3: Volunteer Scheduling Module (4-6 Weeks) -- **Shift Management**: - - Create and assign shifts to volunteers. -- **Volunteer Database**: - - Store contact info and availability. -- **Shift Sign-Up Portal**: - - Volunteers can view and sign up for open shifts. -- **Notifications**: - - Email reminders for upcoming shifts. - -#### Milestone 4: Client/Recipient Management Module (4-6 Weeks) -- **Basic Client Records**: - - Store client names and contact info. -- **Service Tracking**: - - Record services provided (e.g., food baskets). -- **Appointment Scheduling**: - - Book and manage pickup appointments. - ---- - -### Phase 3: Beta Launch and Feedback (4 Weeks) -- **Internal Testing**: - - Test with 1-2 local charities for usability and functionality. -- **Feedback Collection**: - - Gather input from charities on core modules. -- **Bug Fixes and Iteration**: - - Address high-priority issues before the public launch. - ---- - -### Phase 4: Scalability and Enhancements - -#### Milestone 5: Multi-Tenant Enhancements (4-6 Weeks) -- **Custom Branding**: - - Allow each charity to add their logo and configure their dashboard. -- **Tenant Settings**: - - Provide tools to customize hours, notifications, and other settings. - -#### Milestone 6: Advanced Features (4-6 Weeks Per Feature) -- **Donation Needs Portal**: - - Let charities post high-priority donation needs. -- **Analytics and Insights**: - - Provide detailed visualizations for charity performance. -- **Mobile App**: - - Develop a lightweight app for on-the-go updates. - ---- - -## Development Workflow and Practices - -### Git Flow Strategy -- **Main Branches**: - - `main`: Production-ready code - - `development`: Integration branch for features and fixes -- **Supporting Branches**: - - `feature/*`: New features (branched from development) - - `fix/*`: Bug fixes (branched from development) - - `release/*`: Release preparation - - `hotfix/*`: Urgent production fixes (branched from main) - -### Version Control Practices -- **Commit Messages**: Follow Conventional Commits specification - - `feat:` New features - - `fix:` Bug fixes - - `docs:` Documentation changes - - `chore:` Maintenance tasks - - `refactor:` Code refactoring - - `test:` Adding or modifying tests - -### Release Management -- Use Standard Version for semantic versioning -- Automated CHANGELOG generation from conventional commits -- Release tags follow semantic versioning (MAJOR.MINOR.PATCH) - -### Development Process -1. **Feature/Fix Initiation**: - - Create branch from development (`feature/*` or `fix/*`) - - Use descriptive branch names (e.g., `feature/inventory-management`) - -2. **Development**: - - Write code following project standards - - Include relevant tests - - Keep commits focused and conventional - -3. **Code Review**: - - Create Pull Request to development branch - - Peer review required - - All tests must pass - - Code style checks must pass - -4. **Merge & Deploy**: - - Squash and merge to development - - Delete feature branch after merge - - Automated deployment to development environment - -### Quality Standards -- All new features require tests -- Maintain code coverage above 80% -- Follow Vue.js and Node.js best practices -- Use TypeScript for type safety where beneficial - -### Environments -- **Development**: Latest features (development branch) -- **Staging**: Release candidates (release branch) -- **Production**: Stable releases (main branch) - ---- - -## Suggested Timeline Overview -| **Phase** | **Timeline** | -|----------------------------|-----------------| -| Discovery & Planning | 2-4 weeks | -| Milestone 1: Multi-Tenant | 4-6 weeks | -| Milestone 2: Inventory | 4-6 weeks | -| Milestone 3: Scheduling | 4-6 weeks | -| Milestone 4: Client Mgmt | 4-6 weeks | -| Beta Launch & Feedback | 4 weeks | -| Future Enhancements | Ongoing | - ---- - -## Project Goal -The goal of this roadmap is to deliver essential tools to charities quickly while laying the groundwork for a scalable, multi-tenant platform that can serve many organizations with a single code base. diff --git a/docs/Gemfile b/docs/Gemfile index c2483d0..157e918 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -1,24 +1,7 @@ source 'https://rubygems.org' -gem "jekyll", "~> 4.3.4" -gem "just-the-docs", "0.10.0" +gem "jekyll", "~> 4.3.4" # installed by `gem jekyll` +# gem "webrick" # required when using Ruby >= 3 and Jekyll <= 4.2.2 -group :jekyll_plugins do - gem "jekyll-default-layout" - gem "jekyll-seo-tag" - gem "jekyll-feed" -end - -# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem -# and associated library. -platforms :mingw, :x64_mingw, :mswin, :jruby do - gem "tzinfo", ">= 1", "< 3" - gem "tzinfo-data" -end - -# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem -# do not have a Java counterpart. -gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] - -# Required when using Ruby >= 3 and Jekyll <= 4.2.2 -gem "webrick" +gem "just-the-docs", "0.10.0" # pinned to the current release +# gem "just-the-docs" # always download the latest release diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 0000000..dd64b4d --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,91 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + bigdecimal (3.1.8) + colorator (1.1.0) + concurrent-ruby (1.3.4) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + eventmachine (1.2.7) + ffi (1.17.0-arm64-darwin) + ffi (1.17.0-x86_64-linux-gnu) + forwardable-extended (2.6.0) + google-protobuf (4.28.1-arm64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.28.1-x86_64-linux) + bigdecimal + rake (>= 13) + http_parser.rb (0.8.0) + i18n (1.14.6) + concurrent-ruby (~> 1.0) + jekyll (4.3.4) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 1.0) + jekyll-sass-converter (>= 2.0, < 4.0) + jekyll-watch (~> 2.0) + kramdown (~> 2.3, >= 2.3.1) + kramdown-parser-gfm (~> 1.0) + liquid (~> 4.0) + mercenary (>= 0.3.6, < 0.5) + pathutil (~> 0.9) + rouge (>= 3.0, < 5.0) + safe_yaml (~> 1.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) + jekyll-include-cache (0.2.1) + jekyll (>= 3.7, < 5.0) + jekyll-sass-converter (3.0.0) + sass-embedded (~> 1.54) + jekyll-seo-tag (2.8.0) + jekyll (>= 3.8, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + just-the-docs (0.10.0) + jekyll (>= 3.8.5) + jekyll-include-cache + jekyll-seo-tag (>= 2.0) + rake (>= 12.3.1) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.4) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.4.0) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (6.0.1) + rake (13.2.1) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) + ffi (~> 1.0) + rexml (3.3.7) + rouge (4.3.0) + safe_yaml (1.0.5) + sass-embedded (1.78.0-arm64-darwin) + google-protobuf (~> 4.27) + sass-embedded (1.78.0-x86_64-linux-gnu) + google-protobuf (~> 4.27) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + unicode-display_width (2.6.0) + webrick (1.8.1) + +PLATFORMS + arm64-darwin + x86_64-linux-gnu + +DEPENDENCIES + jekyll (~> 4.3.4) + just-the-docs (= 0.10.0) + +BUNDLED WITH + 2.5.9 diff --git a/docs/LICENSE b/docs/LICENSE new file mode 100644 index 0000000..7d510d0 --- /dev/null +++ b/docs/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 just-the-docs + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..362efd4 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,174 @@ +# just-the-docs-template + +This is a *bare-minimum* template to create a [Jekyll] site that: + +- uses the [Just the Docs] theme; +- can be built and published on [GitHub Pages]; +- can be built and previewed locally, and published on other platforms. + +More specifically, the created site: + +- uses a gem-based approach, i.e. uses a `Gemfile` and loads the `just-the-docs` gem; +- uses the [GitHub Pages / Actions workflow] to build and publish the site on GitHub Pages. + +To get started with creating a site, simply: + +1. click "[use this template]" to create a GitHub repository +2. go to Settings > Pages > Build and deployment > Source, and select GitHub Actions + +If you want to maintain your docs in the `docs` directory of an existing project repo, see [Hosting your docs from an existing project repo](#hosting-your-docs-from-an-existing-project-repo). + +After completing the creation of your new site on GitHub, update it as needed: + +## Replace the content of the template pages + +Update the following files to your own content: + +- `index.md` (your new home page) +- `README.md` (information for those who access your site repo on GitHub) + +## Changing the version of the theme and/or Jekyll + +Simply edit the relevant line(s) in the `Gemfile`. + +## Adding a plugin + +The Just the Docs theme automatically includes the [`jekyll-seo-tag`] plugin. + +To add an extra plugin, you need to add it in the `Gemfile` *and* in `_config.yml`. For example, to add [`jekyll-default-layout`]: + +- Add the following to your site's `Gemfile`: + + ```ruby + gem "jekyll-default-layout" + ``` + +- And add the following to your site's `_config.yml`: + + ```yaml + plugins: + - jekyll-default-layout + ``` + +Note: If you are using a Jekyll version less than 3.5.0, use the `gems` key instead of `plugins`. + +## Publishing your site on GitHub Pages + +1. If your created site is `YOUR-USERNAME/YOUR-SITE-NAME`, update `_config.yml` to: + + ```yaml + title: YOUR TITLE + description: YOUR DESCRIPTION + theme: just-the-docs + + url: https://YOUR-USERNAME.github.io/YOUR-SITE-NAME + + aux_links: # remove if you don't want this link to appear on your pages + Template Repository: https://github.com/YOUR-USERNAME/YOUR-SITE-NAME + ``` + +2. Push your updated `_config.yml` to your site on GitHub. + +3. In your newly created repo on GitHub: + - go to the `Settings` tab -> `Pages` -> `Build and deployment`, then select `Source`: `GitHub Actions`. + - if there were any failed Actions, go to the `Actions` tab and click on `Re-run jobs`. + +## Building and previewing your site locally + +Assuming [Jekyll] and [Bundler] are installed on your computer: + +1. Change your working directory to the root directory of your site. + +2. Run `bundle install`. + +3. Run `bundle exec jekyll serve` to build your site and preview it at `localhost:4000`. + + The built site is stored in the directory `_site`. + +## Publishing your built site on a different platform + +Just upload all the files in the directory `_site`. + +## Customization + +You're free to customize sites that you create with this template, however you like! + +[Browse our documentation][Just the Docs] to learn more about how to use this theme. + +## Hosting your docs from an existing project repo + +You might want to maintain your docs in an existing project repo. Instead of creating a new repo using the [just-the-docs template](https://github.com/just-the-docs/just-the-docs-template), you can copy the template files into your existing repo and configure the template's Github Actions workflow to build from a `docs` directory. You can clone the template to your local machine or download the `.zip` file to access the files. + +### Copy the template files + +1. Create a `.github/workflows` directory at your project root if your repo doesn't already have one. Copy the `pages.yml` file into this directory. GitHub Actions searches this directory for workflow files. + +2. Create a `docs` directory at your project root and copy all remaining template files into this directory. + +### Modify the GitHub Actions workflow + +The GitHub Actions workflow that builds and deploys your site to Github Pages is defined by the `pages.yml` file. You'll need to edit this file to that so that your build and deploy steps look to your `docs` directory, rather than the project root. + +1. Set the default `working-directory` param for the build job. + + ```yaml + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: docs + ``` + +2. Set the `working-directory` param for the Setup Ruby step. + + ```yaml + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.1' + bundler-cache: true + cache-version: 0 + working-directory: '${{ github.workspace }}/docs' + ``` + +3. Set the path param for the Upload artifact step: + + ```yaml + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: "docs/_site/" + ``` + +4. Modify the trigger so that only changes within the `docs` directory start the workflow. Otherwise, every change to your project (even those that don't affect the docs) would trigger a new site build and deploy. + + ```yaml + on: + push: + branches: + - "main" + paths: + - "docs/**" + ``` + +## Licensing and Attribution + +This repository is licensed under the [MIT License]. You are generally free to reuse or extend upon this code as you see fit; just include the original copy of the license (which is preserved when you "make a template"). While it's not necessary, we'd love to hear from you if you do use this template, and how we can improve it for future use! + +The deployment GitHub Actions workflow is heavily based on GitHub's mixed-party [starter workflows]. A copy of their MIT License is available in [actions/starter-workflows]. + +---- + +[^1]: [It can take up to 10 minutes for changes to your site to publish after you push the changes to GitHub](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll#creating-your-site). + +[Jekyll]: https://jekyllrb.com +[Just the Docs]: https://just-the-docs.github.io/just-the-docs/ +[GitHub Pages]: https://docs.github.com/en/pages +[GitHub Pages / Actions workflow]: https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/ +[Bundler]: https://bundler.io +[use this template]: https://github.com/just-the-docs/just-the-docs-template/generate +[`jekyll-default-layout`]: https://github.com/benbalter/jekyll-default-layout +[`jekyll-seo-tag`]: https://jekyll.github.io/jekyll-seo-tag +[MIT License]: https://en.wikipedia.org/wiki/MIT_License +[starter workflows]: https://github.com/actions/starter-workflows/blob/main/pages/jekyll.yml +[actions/starter-workflows]: https://github.com/actions/starter-workflows/blob/main/LICENSE diff --git a/docs/_config.yml b/docs/_config.yml index 07f4944..7ce6a24 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -6,49 +6,21 @@ url: https://codevalve.github.io/foodbank baseurl: "" aux_links: - Template Repository: https://github.com/jlovell/foodbank + GitHub Repository: https://github.com/codevalve/foodbank -# Theme settings -color_scheme: foodbank +# Enable search search_enabled: true -heading_anchors: true - -# Enable Mermaid diagrams -mermaid: - version: "10.6.1" # Using latest stable version - initialize: true - -# Enable navigation -nav_external_links: - - title: "Food Bank on GitHub" - url: https://github.com/codevalve/foodbank - hide_icon: false -# Footer content -# appears at the bottom of every page's main content +# Enable anchor links +heading_anchors: true # Back to top link back_to_top: true back_to_top_text: "Back to top" -footer_content: "Copyright © 2024 Food Bank Inventory Management System. Distributed under an MIT license." +# Footer content +footer_content: "Copyright © 2024 Food Bank Inventory Management System. Distributed under an MIT license." # Footer last edited timestamp -last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter -last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html - -# Enable per-page table of contents -enable_toc: true - -# Search settings -search: - heading_level: 3 - previews: 3 - preview_words_before: 5 - preview_words_after: 10 - tokenizer_separator: /[\s/]+/ - rel_url: true - button: false - -# For mermaid diagrams -mermaid_enabled: true +last_edit_timestamp: true +last_edit_time_format: "%b %e %Y at %I:%M %p" diff --git a/docs/_includes/head_custom.html b/docs/_includes/head_custom.html deleted file mode 100644 index 92e0156..0000000 --- a/docs/_includes/head_custom.html +++ /dev/null @@ -1,17 +0,0 @@ -{% if site.mermaid_enabled %} - - -{% endif %} diff --git a/docs/_sass/color_schemes/foodbank.scss b/docs/_sass/color_schemes/foodbank.scss deleted file mode 100644 index dbc75db..0000000 --- a/docs/_sass/color_schemes/foodbank.scss +++ /dev/null @@ -1,32 +0,0 @@ -// Custom color scheme for Food Bank -$link-color: $blue-100; -$btn-primary-color: $blue-200; -$sidebar-color: $grey-lt-000; -$body-text-color: $grey-dk-100; -$nav-child-link-color: $grey-dk-100; - -// Increase base font size and adjust related measurements -$root-font-size: 18px !default; // Increased from default 16px -$body-font-size: 1.1rem !default; // Slightly larger body text -$content-line-height: 1.6 !default; // Increased line height for better readability -$body-heading-line-height: 1.4 !default; - -// Adjust spacing for larger text -$sp-5: 2rem !default; // Slightly increased spacing -$sp-6: 3rem !default; -$sp-7: 4rem !default; - -// Navigation -$nav-width: 264px !default; // Slightly wider nav to accommodate larger text -$nav-width-md: 248px !default; -$content-width: 900px !default; // Wider content area -$header-height: 60px !default; // Taller header for larger text - -// Media query ranges -$media-queries: ( - xs: 320px, - sm: 500px, - md: $content-width, - lg: $content-width + $nav-width, - xl: 1400px -) !default; diff --git a/docs/_sass/custom/custom.scss b/docs/_sass/custom/custom.scss deleted file mode 100644 index 2b8c0a3..0000000 --- a/docs/_sass/custom/custom.scss +++ /dev/null @@ -1,109 +0,0 @@ -// Custom styles for better readability - -// Remove underline from site title -.site-title { - text-decoration: none !important; - - &:hover { - text-decoration: none !important; - } -} - -// Hero section styling -.hero-logo { - display: block; - width: 200px; - height: auto; - margin: 2rem auto; -} - -.hero-section { - text-align: center; - margin-bottom: 3rem; - padding: 2rem 0; -} - -// Increase contrast for better readability -p { - color: $grey-dk-200; -} - -// Make code blocks more readable -div.highlighter-rouge { - font-size: 0.9em; - line-height: 1.5; -} - -// Increase contrast for links -a:not(.nav-list-link) { - text-decoration: underline; - - &:hover { - text-decoration: none; - } -} - -// Make tables more readable -table { - font-size: 0.95em; - line-height: 1.5; -} - -// Improve readability of navigation -.nav-list .nav-list-item .nav-list-link { - line-height: 1.5; - padding: 0.5em 0.5em; -} - -// Add more spacing between sections -.main-content { - h1, h2, h3, h4, h5, h6 { - margin-top: 2em; - margin-bottom: 1em; - } - - ul, ol { - line-height: 1.6; - } -} - -// Better contrast for code -code { - font-size: 0.9em; - padding: 0.2em 0.4em; - border-radius: 4px; -} - -// Custom styles - -// Make logo larger while maintaining aspect ratio -.site-header { - .site-title { - padding-right: 1rem; - - .site-logo { - width: auto; - height: 6rem; // Increased from 3.5rem to 6rem for base size - padding-right: 0.5rem; - } - } -} - -// Adjust logo size for different screen sizes -@media (min-width: 50rem) { - .site-header .site-title .site-logo { - height: 7rem; // Increased from 4rem to 7rem for medium screens - } -} - -@media (min-width: 66.5rem) { - .site-header .site-title .site-logo { - height: 8rem; // Increased from 4.5rem to 8rem for large screens - } -} - -// Improve button readability -.btn { - font-size: 1.1em; - padding: 0.6em 1.2em; -} diff --git a/docs/about.md b/docs/about.md deleted file mode 100644 index e851e30..0000000 --- a/docs/about.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -layout: default -title: About -nav_order: 2 ---- - -# About Food Bank Inventory Management - -## Project Overview - -The Food Bank Inventory Management System is an open-source initiative designed to modernize and streamline food bank operations. Our mission is to help food banks serve their communities more effectively through better inventory management, reducing waste, and improving distribution efficiency. - -## A Collaborative Development - -This project represents a unique collaboration between [CodeValve](https://github.com/codevalve) and [Codeium](https://codeium.com), showcasing the power of human expertise combined with advanced AI technology. - -### Development Partnership - -The development of this system has been guided by: - -- **CodeValve**: Providing domain expertise, project vision, and development leadership -- **Codeium's Windsurf**: Leveraging Cascade, an advanced AI coding assistant, to accelerate development and ensure best practices - -### Built with Cascade - -This project demonstrates the capabilities of Cascade, Codeium's powerful AI pair programmer available exclusively in Windsurf, the world's first agentic IDE. Cascade has contributed to: - -- Architecture design and implementation -- Code quality and consistency -- Documentation generation -- Testing strategies -- Best practices implementation - -## Open Source Philosophy - -We believe in the power of open-source software to create positive change. This project is: - -- Free to use and modify -- Community-driven -- Transparent in development -- Welcoming to contributors - -## Technology Stack - -Our modern technology stack includes: - -- **Frontend**: React 18, TypeScript, Tailwind CSS -- **Backend**: Node.js, Express, TypeScript -- **Database**: PostgreSQL -- **Authentication**: Clerk.com -- **Documentation**: Jekyll with Just the Docs theme - -## Get Involved - -We welcome contributions from developers, food bank operators, and anyone interested in making a difference. Here's how you can get involved: - -- [View our Contributing Guidelines](contributing) -- [Check our GitHub Repository](https://github.com/codevalve/foodbank) -- [Review our Documentation](technical) - -## Contact - -For more information about: -- The project: [contact@example.com](mailto:contact@example.com) -- CodeValve: [GitHub](https://github.com/codevalve) -- Codeium & Windsurf: [codeium.com](https://codeium.com) diff --git a/docs/admin/index.md b/docs/admin/index.md deleted file mode 100644 index dfff8b5..0000000 --- a/docs/admin/index.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -layout: default -title: Administration -nav_order: 4 -has_children: true -permalink: /admin ---- - -# Administration Guide - -This section covers administrative tasks and system maintenance. - -## Core Documentation - -- [Multi-tenant Setup](multi-tenant) - Managing multiple organizations -- [Security Guide](security) - Security best practices and configuration 🚧 -- [Backup & Recovery](backup) - Data backup and restore procedures 🚧 -- [Performance Tuning](performance) - System optimization and monitoring 🚧 - -## Quick Links - -- [System Requirements](../technical/requirements) -- [Installation Guide](../technical/installation) -- [API Documentation](../technical/api-reference) -- [Known Issues](../technical/known-issues) - -## Administration Tasks - -### Tenant Management -- Creating and configuring new tenants -- Managing tenant resources -- Monitoring tenant usage -- Setting up custom domains - -### User Management -- Creating administrator accounts -- Managing user roles and permissions -- Setting up authentication -- User activity monitoring - -### System Maintenance -- Database maintenance -- Storage management -- Cache management -- Log rotation - -### Security -- Access control -- Data encryption -- Security audits -- Compliance monitoring - -## Support - -For administrative support: -1. Check our [technical documentation](../technical) -2. Review [known issues](../technical/known-issues) -3. Contact support at [contact@example.com] diff --git a/docs/admin/multi-tenant.md b/docs/admin/multi-tenant.md deleted file mode 100644 index 0b3fd58..0000000 --- a/docs/admin/multi-tenant.md +++ /dev/null @@ -1,178 +0,0 @@ ---- -layout: default -title: Multi-tenant Setup -parent: Administration -nav_order: 1 -permalink: /admin/multi-tenant ---- - -# Multi-tenant Setup Guide - -## Overview - -The Food Bank Inventory Management System supports multiple organizations (tenants) within a single installation. This guide explains how to set up and manage multiple tenants. - -**Note:** Multi-tenant functionality is currently under development. This documentation outlines the planned features and implementation. - -## Architecture - -### Data Isolation -Each tenant's data is isolated using a combination of: -- Separate database schemas -- Row-level security -- Encrypted data storage - -### Resource Sharing -The following resources are shared across tenants: -- Authentication system -- API infrastructure -- Storage infrastructure -- Background job processors - -## Features - -### Tenant Management -- Basic tenant creation -- Tenant configuration -- Custom domains -- Resource quotas -- Feature flags - -### Data Isolation -- Database isolation -- User separation -- File storage isolation -- API rate limiting - -### Administration -- Tenant administrator role -- Basic user management -- Resource monitoring -- Usage analytics - -## Setup Process - -### 1. Creating a New Tenant - -Currently, tenants can be created through the admin interface or using the CLI: - -```bash -# Using the CLI tool (coming soon) -foodbank-cli tenant create \ - --name "Downtown Food Bank" \ - --admin-email "admin@downtown.org" -``` - -### 2. Tenant Configuration - -Each tenant can be configured using a YAML file: - -```yaml -tenant: - name: "Downtown Food Bank" - slug: "downtown" # Used in URLs - admin: - email: "admin@downtown.org" - name: "Admin User" - settings: - timezone: "America/New_York" - language: "en-US" - # Future configurations (not yet implemented) - advanced: - domain: "downtown.foodbank.org" # Coming soon - storage: - quota: "10GB" # Coming soon - type: "premium" # Coming soon - features: # Coming soon - - analytics - - api_access - - bulk_operations -``` - -### 3. User Management - -Current capabilities: -- Create tenant administrators -- Basic user roles (Admin, Staff, User) -- Basic permissions -- Custom roles -- Fine-grained permissions -- User quotas - -## Security Considerations - -### Current Security Features -- Tenant data isolation -- User authentication -- Basic role-based access -- Session management - -### Planned Security Enhancements -- Enhanced audit logging -- IP whitelisting -- 2FA requirement option -- SSO integration -- Advanced encryption options - -## Best Practices - -1. **Regular Audits** - - Review active users - - Monitor resource usage - - Check access patterns - -2. **Resource Management** - - Monitor database usage - - Track API usage - - Watch storage consumption - -3. **Security** - - Regular permission reviews - - Security log monitoring - - Access pattern analysis - -## Troubleshooting - -### Common Issues - -1. **Database Connection Issues** - ``` - Error: Could not connect to tenant database - ``` - - Check database credentials - - Verify tenant configuration - - Ensure database server is running - -2. **User Access Problems** - ``` - Error: User not authorized for tenant - ``` - - Verify user-tenant association - - Check role assignments - - Review permission settings - -## Development Status - -The multi-tenant system is being developed incrementally: - -### Phase 1 (Current) -- Basic tenant isolation -- User management -- Role-based access - -### Phase 2 (In Progress) -- Custom domains -- Resource quotas -- Enhanced monitoring - -### Phase 3 (Planned) -- Advanced security features -- Analytics dashboard -- Automated scaling - -## Support - -For assistance with multi-tenant setup: -1. Check our [technical documentation](../technical) -2. Review [known issues](../technical/known-issues) -3. Contact support at [contact@example.com] diff --git a/docs/assets/images/FoodBank - Logo - Blue - Transparent.png b/docs/assets/images/FoodBank - Logo - Blue - Transparent.png deleted file mode 100644 index b6bad07..0000000 Binary files a/docs/assets/images/FoodBank - Logo - Blue - Transparent.png and /dev/null differ diff --git a/docs/contributing/index.md b/docs/contributing/index.md deleted file mode 100644 index 72618cd..0000000 --- a/docs/contributing/index.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -layout: default -title: Contributing -nav_order: 5 ---- - -# Contributing to the Project - -Thank you for your interest in contributing to the Food Bank Inventory Management System! We're excited about the possibility of working together to improve food bank operations worldwide. - -## Current Development Status - -This project is currently in its early stages of development. We are: -- Establishing core architecture -- Implementing basic features -- Setting up development workflows -- Building documentation - -## How to Get Involved - -During this early phase, we're looking to connect with potential contributors who can help shape the project's direction. If you're interested in contributing, we'd love to hear from you! - -### Ways to Contribute - -Even in these early stages, there are several ways you can contribute: -1. **Technical Expertise**: Share your experience with similar systems -2. **Domain Knowledge**: Provide insights about food bank operations -3. **Documentation**: Help improve our documentation -4. **Testing**: Help test features as they're developed -5. **Ideas**: Share your thoughts on features and improvements - -### Getting Started - -To get involved: -1. Review our [project documentation](../project/) -2. Check our [current status](../project/current-status) -3. Reach out to discuss how you can contribute - -## Contact Us - -For now, the best way to get involved is to reach out directly: -- Open a [GitHub Issue](https://github.com/codevalve/foodbank/issues) -- Email us at [contact@example.com] - -## Future Contributing Process - -As the project matures, we will establish: -- Detailed contribution guidelines -- Code review process -- Testing requirements -- Development workflows -- Release procedures - -Stay tuned for updates as we continue to build out our contribution process. We look forward to collaborating with you! diff --git a/docs/images/FoodBank - Hero Image - App - Large - Transparent.png b/docs/images/FoodBank - Hero Image - App - Large - Transparent.png deleted file mode 100644 index 35232f4..0000000 Binary files a/docs/images/FoodBank - Hero Image - App - Large - Transparent.png and /dev/null differ diff --git a/docs/images/FoodBank - Hero Image - App - Small - Transparent.png b/docs/images/FoodBank - Hero Image - App - Small - Transparent.png deleted file mode 100644 index ed65281..0000000 Binary files a/docs/images/FoodBank - Hero Image - App - Small - Transparent.png and /dev/null differ diff --git a/docs/images/FoodBank - Logo - BW - Transparent.png b/docs/images/FoodBank - Logo - BW - Transparent.png deleted file mode 100644 index 806e3d9..0000000 Binary files a/docs/images/FoodBank - Logo - BW - Transparent.png and /dev/null differ diff --git a/docs/images/inventory-dashboard.png b/docs/images/inventory-dashboard.png deleted file mode 100644 index 1cb5151..0000000 Binary files a/docs/images/inventory-dashboard.png and /dev/null differ diff --git a/docs/index.md b/docs/index.md index 4972b58..ca0c545 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,49 +1,35 @@ --- -layout: home title: Home -nav_order: 1 -description: "Food Bank Inventory Management System Documentation" -permalink: / +layout: home --- -
- -
- -# Food Bank Inventory Management -{: .fs-9 } +This is a *bare-minimum* template to create a Jekyll site that uses the [Just the Docs] theme. You can easily set the created site to be published on [GitHub Pages] – the [README] file explains how to do that, along with other details. -A modern, open-source inventory management system designed specifically for food banks. -{: .fs-6 .fw-300 } - -[Get Started](/docs/user-guide/getting-started){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } -[View on GitHub](https://github.com/codevalve/foodbank){: .btn .fs-5 .mb-4 .mb-md-0 } - ---- +If [Jekyll] is installed on your computer, you can also build and preview the created site *locally*. This lets you test changes before committing them, and avoids waiting for GitHub Pages.[^1] And you will be able to deploy your local build to a different platform than GitHub Pages. -## About the Project +More specifically, the created site: -The Food Bank Inventory Management System is a collaborative project between CodeValve and Codeium, built using Windsurf's Cascade AI assistant. [Learn more about our collaboration](/docs/about). +- uses a gem-based approach, i.e. uses a `Gemfile` and loads the `just-the-docs` gem +- uses the [GitHub Pages / Actions workflow] to build and publish the site on GitHub Pages -## Quick Links +Other than that, you're free to customize sites that you create with this template, however you like. You can easily change the versions of `just-the-docs` and Jekyll it uses, as well as adding further plugins. -- [Project Requirements](/docs/project/requirements) -- [Technical Documentation](/docs/technical) -- [API Reference](/docs/technical/api-reference) -- [Contributing Guidelines](https://github.com/codevalve/foodbank/blob/main/CONTRIBUTING.md) +[Browse our documentation][Just the Docs] to learn more about how to use this theme. -## Key Features +To get started with creating a site, simply: -- **Multi-tenant Support**: Manage multiple food bank locations from a single platform -- **Inventory Tracking**: Real-time tracking of food items, expiration dates, and stock levels -- **Donation Management**: Track and manage donations from various sources -- **Distribution Planning**: Plan and track food distribution to those in need -- **Reporting**: Generate detailed reports on inventory, donations, and distribution +1. click "[use this template]" to create a GitHub repository +2. go to Settings > Pages > Build and deployment > Source, and select GitHub Actions -## Getting Started +If you want to maintain your docs in the `docs` directory of an existing project repo, see [Hosting your docs from an existing project repo](https://github.com/just-the-docs/just-the-docs-template/blob/main/README.md#hosting-your-docs-from-an-existing-project-repo) in the template README. -Get started quickly by following our [installation guide](/docs/user-guide/getting-started). +---- -## Contributing +[^1]: [It can take up to 10 minutes for changes to your site to publish after you push the changes to GitHub](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll#creating-your-site). -We welcome contributions! Please see our [contributing guidelines](https://github.com/codevalve/foodbank/blob/main/CONTRIBUTING.md) for details. +[Just the Docs]: https://just-the-docs.github.io/just-the-docs/ +[GitHub Pages]: https://docs.github.com/en/pages +[README]: https://github.com/just-the-docs/just-the-docs-template/blob/main/README.md +[Jekyll]: https://jekyllrb.com +[GitHub Pages / Actions workflow]: https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/ +[use this template]: https://github.com/just-the-docs/just-the-docs-template/generate diff --git a/docs/project/changelog.md b/docs/project/changelog.md deleted file mode 100644 index 28e7f78..0000000 --- a/docs/project/changelog.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -layout: default -title: Changelog -parent: Project Documentation -nav_order: 2 ---- - -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [Unreleased] - -### Added -- Initial project setup with React 18 and TypeScript -- Basic inventory management functionality -- Multi-tenant architecture foundation -- GitHub Pages documentation site -- Documentation structure with Just the Docs theme -- Accessibility improvements for documentation - -### Changed -- Updated documentation navigation structure -- Improved documentation readability with larger fonts -- Modernized documentation design - -### Infrastructure -- Set up development environment -- Configured TypeScript and ESLint -- Implemented Vite build system -- Added Tailwind CSS for styling - -### Documentation -- Created comprehensive documentation structure -- Added user guide section -- Added technical documentation section -- Added administration section -- Improved documentation accessibility - -## [0.1.0] - 2024-01-XX - -### Initial Release -- Basic project structure -- Core dependencies setup -- Development environment configuration -- Initial documentation framework - -## Future Releases - -### [0.2.0] - Planned -- Complete inventory management system -- User authentication and authorization -- Basic reporting functionality -- API documentation - -### [0.3.0] - Planned -- Donation management system -- Enhanced reporting capabilities -- Mobile responsive design -- Performance optimizations - -### [0.4.0] - Planned -- Distribution management -- Advanced analytics -- Integration capabilities -- Enhanced security features diff --git a/docs/project/current-status.md b/docs/project/current-status.md deleted file mode 100644 index 0384b89..0000000 --- a/docs/project/current-status.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -layout: default -title: Current Status -parent: Project Documentation -nav_order: 3 ---- - -# Current Development Status - -## Overview -The Food Bank Inventory Management System is currently in active development. This page provides a snapshot of the current state of the project. - -## Completed Features - -### Infrastructure -- ✅ Project initialization with React 18 -- ✅ TypeScript configuration -- ✅ Vite build system setup -- ✅ ESLint and Prettier configuration -- ✅ Tailwind CSS integration -- ✅ Development environment setup - -### Documentation -- ✅ Documentation site setup with Jekyll -- ✅ Just the Docs theme implementation -- ✅ Basic navigation structure -- ✅ User guide framework -- ✅ Technical documentation framework -- ✅ Administration guide framework -- ✅ Accessibility improvements - -### Core Features -- ✅ Basic project structure -- ✅ Multi-tenant architecture foundation -- ✅ Initial database schema design -- ✅ Basic API endpoints structure - -## In Progress - -### Frontend Development -- 🔄 User interface components -- 🔄 Responsive design implementation -- 🔄 Form validation -- 🔄 State management setup - -### Backend Development -- 🔄 API endpoints implementation -- 🔄 Database integration -- 🔄 Authentication system -- 🔄 Multi-tenant logic - -### Documentation -- 🔄 API documentation -- 🔄 Development guides -- 🔄 Deployment instructions -- 🔄 Contributing guidelines - -## Planned Features - -### Short Term (Next 2-4 Weeks) -- Complete inventory management core features -- Implement user authentication -- Set up basic reporting -- Complete initial API documentation - -### Medium Term (2-3 Months) -- Donation management system -- Enhanced reporting capabilities -- Mobile-responsive design -- Performance optimizations - -### Long Term (3-6 Months) -- Distribution management -- Advanced analytics -- Third-party integrations -- Enhanced security features - -## Known Issues -1. Documentation navigation needs further refinement -2. API endpoint documentation is incomplete -3. Test coverage needs improvement - -## Development Metrics -- **Test Coverage**: ~20% -- **Code Quality**: Good (ESLint passing) -- **Documentation**: ~40% complete -- **API Completion**: ~15% - -## Contributing -We welcome contributions! Please see our [contributing guidelines](https://github.com/codevalve/foodbank/blob/main/CONTRIBUTING.md) for more information on how to get involved. diff --git a/docs/project/index.md b/docs/project/index.md deleted file mode 100644 index ef70579..0000000 --- a/docs/project/index.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -layout: default -title: Project Documentation -nav_order: 4 -has_children: true ---- - -# Project Documentation - -Welcome to the project documentation section. Here you'll find comprehensive information about the project's requirements, current status, and development progress. - -## Quick Links - -- [Original Requirements](requirements): View the initial project requirements and specifications -- [Current Status](current-status): Check the current development status and progress -- [Changelog](changelog): Track all changes and updates to the project - -## Project Overview - -The Food Bank Inventory Management System is an open-source project aimed at helping food banks efficiently manage their inventory, donations, and distribution processes. The system is built with modern web technologies and follows best practices for accessibility, security, and scalability. - -### Key Goals - -1. **Efficiency**: Streamline food bank operations -2. **Accessibility**: Ensure the system is usable by everyone -3. **Reliability**: Provide a stable and dependable platform -4. **Scalability**: Support growth and multiple locations -5. **Community**: Foster an active open-source community - -### Technology Stack - -- **Frontend**: React 18, TypeScript, Tailwind CSS -- **Backend**: Node.js, Express, TypeScript -- **Database**: PostgreSQL, Redis -- **Infrastructure**: Docker, Kubernetes -- **Documentation**: Jekyll, Just the Docs - -### Development Philosophy - -We follow these core principles: - -1. **User-Centered Design**: All features are designed with the end-user in mind -2. **Accessibility First**: WCAG 2.1 compliance is a core requirement -3. **Open Source**: Community-driven development and transparency -4. **Quality Code**: Comprehensive testing and documentation -5. **Security**: Following security best practices - -For more detailed information, please explore the sections linked above. diff --git a/docs/project/requirements.md b/docs/project/requirements.md deleted file mode 100644 index 454693f..0000000 --- a/docs/project/requirements.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -layout: default -title: Original Requirements -parent: Project Documentation -nav_order: 1 ---- - -# Original Requirements - -## Core Requirements - -### User Interface -- Modern, responsive web interface -- Mobile-friendly design -- Intuitive navigation -- Accessibility compliance (WCAG 2.1) - -### Multi-tenant Architecture -- Support for multiple food bank locations -- Isolated data per tenant -- Shared infrastructure -- Centralized administration - -### Inventory Management -- Real-time inventory tracking -- Barcode/QR code support -- Expiration date tracking -- Stock level alerts -- Batch operations -- Category management -- Storage location tracking - -### Donation Management -- Donor registration and tracking -- Donation receipt generation -- Item categorization -- Donation history -- Tax receipt generation -- Donor communication tools - -### Distribution Management -- Client registration -- Need assessment -- Distribution scheduling -- Package assembly -- Distribution tracking -- Client history - -### Reporting -- Inventory reports -- Donation reports -- Distribution reports -- Custom report generation -- Data export capabilities -- Analytics dashboard - -### Security -- Role-based access control -- Data encryption -- Audit logging -- Secure authentication -- Password policies -- Session management - -### Integration -- API-first design -- Webhook support -- Third-party integration capabilities -- Data import/export tools - -## Authentication Requirements - -### User Authentication -- Implement Clerk.com for secure user authentication -- Support multiple authentication methods (email/password, SSO, social) -- Enable Multi-Factor Authentication (MFA) for enhanced security -- Implement role-based access control (RBAC) - -### Multi-tenant Support -- Separate organization management for each food bank -- Delegated user management for food bank administrators -- Custom domain support for each organization -- Isolated data access between organizations - -### Security Requirements -- SOC 2 Type 2 compliance through Clerk.com -- GDPR compliance for data protection -- Secure session management -- Comprehensive audit logging - -## Technical Requirements - -### Backend -- RESTful API architecture -- TypeScript implementation -- PostgreSQL database -- Redis caching -- Prisma ORM -- Express.js framework - -### Frontend -- React 18 -- TypeScript -- Tailwind CSS -- Vite build tool -- Progressive Web App (PWA) -- Offline capabilities - -### Infrastructure -- Docker containerization -- Kubernetes orchestration -- CI/CD pipeline -- Automated testing -- Monitoring and logging -- Backup and recovery -- High availability - -### Performance -- Sub-second response times -- Support for 1000+ concurrent users -- 99.9% uptime -- Automated scaling -- Performance monitoring - -### Compliance -- GDPR compliance -- HIPAA compliance where applicable -- Data retention policies -- Privacy by design -- Security best practices diff --git a/docs/technical/api-reference.md b/docs/technical/api-reference.md deleted file mode 100644 index f64c6c6..0000000 --- a/docs/technical/api-reference.md +++ /dev/null @@ -1,185 +0,0 @@ ---- -layout: default -title: API Reference -parent: Technical Documentation -nav_order: 1 -permalink: docs/technical/api-reference ---- - -# API Reference - -## Overview - -Our REST API provides programmatic access to the Food Bank Inventory Management System. This reference documents all available endpoints and their usage. - -**Note:** The API is currently under active development. This documentation reflects the planned API structure and may change as development progresses. - -## Authentication - -All API requests require authentication using JWT tokens. Include the token in the Authorization header: - -```bash -Authorization: Bearer -``` - -## Base URL - -``` -https://api.foodbank.example.com/v1 -``` - -## Available Endpoints - -### Inventory Management - -#### List Items - -```http -GET /items -``` - -Query Parameters: -- `category` - Filter by category -- `location` - Filter by location -- `status` - Filter by status -- `page` - Page number (default: 1) -- `limit` - Items per page (default: 20, max: 100) - -Response: -```json -{ - "items": [ - { - "id": "item_123", - "name": "Canned Soup", - "category": "Canned Goods", - "quantity": 100, - "expirationDate": "2024-12-31", - "location": "Warehouse A", - "createdAt": "2024-01-15T10:00:00Z", - "updatedAt": "2024-01-15T10:00:00Z" - } - ], - "pagination": { - "currentPage": 1, - "totalPages": 5, - "totalItems": 100, - "itemsPerPage": 20 - } -} -``` - -#### Add Item - -```http -POST /items -``` - -Request Body: -```json -{ - "name": "Canned Soup", - "category": "Canned Goods", - "quantity": 100, - "expirationDate": "2024-12-31", - "location": "Warehouse A" -} -``` - -Response: -```json -{ - "id": "item_123", - "name": "Canned Soup", - "category": "Canned Goods", - "quantity": 100, - "expirationDate": "2024-12-31", - "location": "Warehouse A", - "createdAt": "2024-01-15T10:00:00Z", - "updatedAt": "2024-01-15T10:00:00Z" -} -``` - -### Stock Management - -#### Update Stock Level - -```http -PUT /items/{id}/stock -``` - -Request Body: -```json -{ - "quantity": 150, - "reason": "Donation received", - "notes": "Monthly donation from Local Grocery" -} -``` - -Response: -```json -{ - "id": "item_123", - "quantity": 150, - "previousQuantity": 100, - "updatedAt": "2024-01-15T10:30:00Z", - "reason": "Donation received", - "notes": "Monthly donation from Local Grocery" -} -``` - -## Rate Limits - -- 1000 requests per hour per API token -- Bulk operations count as multiple requests -- Rate limit headers are included in all responses: - ``` - X-RateLimit-Limit: 1000 - X-RateLimit-Remaining: 999 - X-RateLimit-Reset: 1640995200 - ``` - -## Error Handling - -The API uses standard HTTP response codes: - -### Success Codes -- `200 OK`: Request succeeded -- `201 Created`: Resource created successfully -- `204 No Content`: Request succeeded with no response body - -### Client Error Codes -- `400 Bad Request`: Invalid request format or parameters -- `401 Unauthorized`: Missing or invalid authentication -- `403 Forbidden`: Valid authentication but insufficient permissions -- `404 Not Found`: Resource not found -- `429 Too Many Requests`: Rate limit exceeded - -### Server Error Codes -- `500 Internal Server Error`: Server encountered an error -- `503 Service Unavailable`: Service temporarily unavailable - -Error Response Format: -```json -{ - "error": { - "code": "INVALID_REQUEST", - "message": "Invalid request parameters", - "details": { - "quantity": "Must be a positive number" - } - } -} -``` - -## Development Status - -This API is currently under development. Features marked with 🚧 are not yet implemented. - -## Questions and Support - -For questions about the API: -1. Check our [technical documentation](../technical) -2. Open an issue on [GitHub](https://github.com/codevalve/foodbank/issues) -3. Contact us at [contact@example.com] diff --git a/docs/technical/authentication.md b/docs/technical/authentication.md deleted file mode 100644 index bac5aca..0000000 --- a/docs/technical/authentication.md +++ /dev/null @@ -1,191 +0,0 @@ ---- -layout: default -title: Authentication -parent: Technical Documentation -nav_order: 2 ---- - -# Authentication System - -The Food Bank Inventory Management System uses [Clerk.com](https://clerk.com) for authentication and user management. This document outlines the authentication architecture, setup process, and best practices. - -## Why Clerk? - -We chose Clerk.com for its robust multi-tenant capabilities and enterprise-grade features: - -1. **Multi-tenant Architecture** - - Organization management for different food banks - - Hierarchical user permissions - - Isolated user management per food bank - -2. **Enterprise Features** - - SSO/SAML support - - Custom domains - - Advanced security features - - Compliance (SOC 2 Type 2, GDPR) - -3. **User Management** - - Delegated administration - - Built-in user directory - - Role-based access control - - Audit logs - -## Architecture - -```mermaid -graph TD - A[User] -->|Authentication Request| B[Clerk.com] - B -->|Token| C[Frontend App] - C -->|API Request + Token| D[Backend API] - D -->|Verify Token| B - D -->|Authorized Request| E[Database] -``` - -## Implementation - -### Frontend Setup - -```typescript -// Example React component with Clerk -import { SignIn } from "@clerk/nextjs"; - -export default function SignInPage() { - return ; -} -``` - -### Backend Integration - -```typescript -// Example API route protection -import { clerkClient } from "@clerk/nextjs/server"; -import { getAuth } from "@clerk/nextjs/server"; - -export default async function handler(req, res) { - const { userId } = getAuth(req); - if (!userId) { - return res.status(401).json({ error: "Unauthorized" }); - } - // Continue with authorized request -} -``` - -## User Roles & Permissions - -| Role | Description | Permissions | -|------|-------------|------------| -| System Admin | Platform-wide administration | All permissions | -| Food Bank Admin | Single organization admin | Organization management, user management | -| Staff | Regular food bank staff | Inventory management, basic reporting | -| Volunteer | Limited access users | Data entry, basic inventory views | - -## Organization Structure - -Each food bank operates as a separate organization within Clerk: - -```mermaid -graph TD - A[Food Bank Organization] --> B[Admin Users] - A --> C[Staff Users] - A --> D[Volunteer Users] - B --> E[User Management] - B --> F[Role Assignment] - B --> G[Access Control] -``` - -## Security Considerations - -1. **Token Management** - - JWT-based authentication - - Short-lived access tokens - - Secure token rotation - -2. **Multi-factor Authentication** - - Optional for all users - - Required for admin accounts - - Various 2FA options - -3. **Session Management** - - Configurable session duration - - Device management - - Session revocation - -## Setup Process - -1. **Initial Configuration** - ```bash - # Install Clerk SDK - npm install @clerk/nextjs - ``` - -2. **Environment Variables** - ```env - NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_*** - CLERK_SECRET_KEY=sk_*** - ``` - -3. **Provider Setup** - ```typescript - // pages/_app.tsx - import { ClerkProvider } from '@clerk/nextjs' - - function MyApp({ Component, pageProps }) { - return ( - - - - ) - } - ``` - -## Best Practices - -1. **Organization Setup** - - Use meaningful organization names - - Configure custom domains - - Set up proper role hierarchies - -2. **User Management** - - Enable email verification - - Configure password policies - - Set up proper user groups - -3. **Security** - - Enable audit logs - - Configure session timeouts - - Set up proper CORS policies - -## Migration Guide - -For existing food banks migrating to the platform: - -1. **Data Preparation** - - Export user data in compatible format - - Map existing roles to new system - - Prepare organization structure - -2. **Migration Process** - - Create organization in Clerk - - Bulk import users - - Verify user access - -3. **Post-Migration** - - Verify user permissions - - Test SSO if applicable - - Update documentation - -## Support and Troubleshooting - -For authentication issues: - -1. Check the [Clerk Dashboard](https://dashboard.clerk.dev) -2. Review audit logs -3. Contact system administration -4. Consult Clerk documentation - -## Future Considerations - -- Enhanced SSO integrations -- Advanced audit capabilities -- Custom authentication flows -- Enhanced security features diff --git a/docs/technical/index.md b/docs/technical/index.md deleted file mode 100644 index 8b769c4..0000000 --- a/docs/technical/index.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -layout: default -title: Technical Documentation -nav_order: 3 -has_children: true -permalink: /technical ---- - -# Technical Documentation - -## Core Components - -- [Architecture Overview](architecture) -- [Authentication](authentication) - User authentication and authorization using Clerk.com -- [API Reference](api-reference) -- [Database Schema](database) -- [Deployment Guide](deployment) - -## Development - -- [Getting Started](getting-started) -- [Development Environment](development-environment) -- [Testing Guide](testing) -- [Code Style Guide](code-style) - -## Infrastructure - -- [System Requirements](requirements) -- [Monitoring](monitoring) -- [Backup & Recovery](backup) -- [Security](security) diff --git a/docs/user-guide/getting-started.md b/docs/user-guide/getting-started.md deleted file mode 100644 index 22ac003..0000000 --- a/docs/user-guide/getting-started.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -layout: default -title: Getting Started -parent: User Guide -nav_order: 1 -permalink: /docs/user-guide/getting-started ---- - -# Getting Started with Food Bank Inventory Management - -Welcome to the Food Bank Inventory Management System documentation. This guide will help you get started with setting up and using the system. - -## Overview - -The Food Bank Inventory Management System is a comprehensive solution designed to help food banks efficiently track and manage their resources. Built with modern web technologies, it provides: - -- Real-time inventory tracking -- Multi-location support -- Smart analytics and reporting -- User-friendly interface - -## Quick Start - -1. Clone the repository: - ```bash - git clone https://github.com/codevalve/foodbank.git - ``` - -2. Install dependencies: - ```bash - cd foodbank - npm install - ``` - -3. Start the development server: - ```bash - npm run dev - ``` - -## Features - -### Real-time Tracking -Monitor stock levels, receive alerts, and manage inventory in real-time with our powerful dashboard. - -### Smart Analytics -Make informed decisions with detailed insights into inventory trends and usage patterns. - -### Multi-tenant Support -Manage multiple locations with ease using our multi-tenant architecture. - -## Technical Stack - -- Frontend: React 18 -- Language: TypeScript -- Styling: Tailwind CSS -- Build Tool: Vite -- State Management: React Query v5 -- Routing: React Router diff --git a/docs/user-guide/index.md b/docs/user-guide/index.md deleted file mode 100644 index baf0586..0000000 --- a/docs/user-guide/index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -layout: default -title: User Guide -nav_order: 2 -has_children: true ---- - -# User Guide - -Welcome to the Food Bank Inventory Management System user guide. This section contains detailed information about using the system effectively. - -## Sections - -- [Getting Started](getting-started) - System requirements and initial setup -- [Inventory Management](inventory) - Basic inventory operations -- User Management (Coming Soon) - Managing users and permissions -- Reports & Analytics (Coming Soon) - Generate and analyze reports diff --git a/docs/user-guide/inventory.md b/docs/user-guide/inventory.md deleted file mode 100644 index 4d0ac4a..0000000 --- a/docs/user-guide/inventory.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -layout: default -title: Inventory Management -parent: User Guide -nav_order: 2 -permalink: /docs/user-guide/inventory ---- - -# Inventory Management Basics - -## Overview - -Learn how to effectively manage your food bank's inventory using our system. This guide covers the essential operations you'll need to perform daily. - -## Key Features - -### Adding Items -- How to add new items to inventory -- Setting up categories and labels -- Managing expiration dates -- Setting stock levels and alerts - -### Managing Stock -- Receiving donations -- Recording distributions -- Stock transfers between locations -- Inventory adjustments - -### Tracking & Organization -- Barcode scanning -- Location management -- Batch tracking -- FIFO/FEFO management - -### Alerts & Notifications -- Low stock alerts -- Expiration notifications -- Distribution reminders -- System alerts - -## Best Practices - -1. Regular inventory counts -2. Proper categorization -3. Timely updates -4. Stock rotation