Skip to content

Application developed to help encourage sharing - Both in sharing physical goods by using the public website - as well as sharing knowledge in how the system is developed.

License

Notifications You must be signed in to change notification settings

simnova/sharethrift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ShareThrift

A modern, community‑driven platform designed to reduce waste and enable the sharing of items, services, and classes — empowering individuals and organizations to participate in the circular economy.

Quality Gate Status

Known Vulnerabilities

Bugs

Code Smells

Coverage

Duplicated Lines (%)

Build Status

main-screen-banner

📌 Introduction

Getting Started: Our Docusaurus website will help you get started in running and contributing to ShareThrift.

Note: SonarCloud badges reference the simnova_sharethrift-data-access project configured in sonar-project.properties for monorepo analysis.

ShareThrift is a web‑based peer‑to‑peer sharing platform that enables people and organizations to lend, borrow, or offer items, services, and classes. Inspired by platforms like Turo, Airbnb, and Facebook Marketplace — but built specifically for the sharing economy — ShareThrift provides a structured, trusted, and community-first way to exchange goods.

ShareThrift exists to:

  • Reduce consumer waste by extending item lifecycles
  • Enable cost‑efficient access to tools, equipment, and skills
  • Support individuals, small businesses, and partners with flexible sharing models
  • Explore modern technology and product design patterns through an MVP implementation
  • This project is built using Domain-Driven Design (DDD), event-driven communication, and modular application boundaries as specified in the official BRD/SRD.

🗂 Table of Contents

✨ Features

🔍 Browse, Search & Filter Listings

  • Filter by location and category
  • View active, inactive, and upcoming listings

🧰 Create & Manage Listings

  • Support for Item, Service, and Class listings
  • Draft, publish, pause, cancel, appeal, and reinstate listings
  • AI‑assisted draft creation using the integrated chatbot

📅 Reservation Lifecycle

  • Calendar‑based booking
  • Accept, reject, cancel, and close reservation flows
  • Email notifications for all major events

💬 Messaging

  • In‑platform messaging between sharers and reservers

🛡 Admin Tools

  • Listing moderation
  • User blocking/unblocking
  • Feature flag management
  • Embedded analytics and reporting

🏗 Architecture

ShareThrift is implemented using Domain-Driven Design (DDD), event-driven behaviors, and clear modular boundaries defined in the BRD/SRD. These principles ensure predictable evolution, maintainability, and clear separation of concerns across the platform.

ShareThrift applies layered Domain-Driven Design:

  • Domain Layer: aggregates, entities, value objects, domain events (see Domain & DDD Concepts)
  • Application Layer: orchestration / services (future explicit service modules)
  • Infrastructure Layer: persistence (Mongoose), telemetry, messaging adapters
  • Interface Layer: Azure Functions entrypoints (GraphQL + planned REST)

Key patterns:

  • Aggregates coordinate consistency boundaries
  • Value Objects enforce immutability and constraints
  • Unit of Work plans for atomic change sets
  • Event-driven strategy (domain + integration events) evolving via ADRs
  • Service Registry (Cellix.initializeServices) for dependency injection

🧬 Monorepo Structure

apps/
  api/            # Azure Functions host (GraphQL + future REST)
  docs/           # Docusaurus docs site
  ui-sharethrift/ # Front-end (Vite + TypeScript)
packages/
  sthrift/        # Domain + adapters (graphql, mongoose, etc.)
  cellix/         # Seedwork abstractions
iac/              # Bicep infrastructure modules
documents/        # BRD, SRD, ADRs, architecture diagrams

🛠 Tech Stack

🚀 Getting Started

🧩 Prerequisites

  • Node.js (use nvm with project .nvmrc)
  • Azurite

🏗️ Install & Build

nvm use
pnpm install
pnpm run build

Terminal running 'pnpm install' to install workspace dependencies Terminal running 'pnpm run build' to build all packages

🛠️ Run (Dev)

pnpm run dev

Terminal running 'pnpm run dev' starting Azure Functions host and frontend

🔗 Local Endpoints

Portal Endpoint
Frontend http://localhost:3000
Docs http://localhost:3002
GraphQL http://localhost:7071/api/graphql

🧩 Domain & DDD Conventions

This repo follows strict DDD boundaries (contexts, aggregates, value objects, repositories, UoW, and permissions via passports/visas). See full conventions, file naming, and reviewer checks in CONTRIBUTING.

🧪 Testing

Run tests with pnpm run test. Detailed expectations for coverage, styles, and scenario files are centralized in CONTRIBUTING.

Terminal running 'pnpm run test' showing passing unit tests and coverage

🧾 Architecture Decisions (ADRs)

Located in apps/docs/docs/decisions

  • 0001-madr-architecture-decisions.md
  • adr-short-template.md
  • adr-template.md
  • 0022-existing-azure-upload.md

Add a new ADR for any significant platform, pattern, or model/idea change (e.g., Azure Upload - Enhancement).

🤝 Contributing

  1. Fork / branch from main (e.g., feature/listing-lifecycle)
  2. Implement domain changes first (aggregate, permissions)
  3. Add tests & update docs
  4. Run: pnpm run build and pnpm run test
  5. Submit PR referencing ADRs if relevant

Coding Guidelines:

  • Explicit domain terminology > generic names
  • Keep functions small & intention-revealing
  • Avoid leaking infrastructure concerns into domain layer

About

Application developed to help encourage sharing - Both in sharing physical goods by using the public website - as well as sharing knowledge in how the system is developed.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 22