> For the complete documentation index, see [llms.txt](https://docs.smartresourceconnect.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smartresourceconnect.org/readme.md).

# Introduction

## Architecture Overview

Smart Resource Connect utilizes a modern, cloud-based architecture designed for scalability, ease of deployment, and global accessibility. It follows a decoupled Jamstack approach, separating frontend user interfaces from backend data services, ensuring fast performance and robust security.

### Key Technologies

* **Frontend:** Next.js (React)
* **Deployment & Hosting:** Netlify
* **Code Repository:** GitHub
* **Design System:** Tailwind CSS
* **HTTP Client:** Axios
* **Backend Database & Authentication:** Supabase
* **CDN and Security:** Cloudflare

## API Specifications

Smart Resource Connect provides a REST API for third-party integrations, enabling external systems to submit surplus listings, post resource needs, and query for matches.

### Authentication and Security

* Bearer Token Authentication (JWT)
* HTTPS required for all API calls

### Core API Endpoints

* `GET /v1/surplus`: List surplus resources
* `GET /v1/demand`: List resource demands
* `POST /v1/surplus`: Create surplus listing
* `POST /v1/demand`: Create demand listing
* `GET /v1/surplus/{id}`: Get surplus details
* `GET /v1/demand/{id}`: Get demand details
* `GET /v1/match`: Matchmaking endpoint
* `PUT/PATCH /v1/surplus/{id}`: Update surplus listings
* `PUT/PATCH /v1/demand/{id}`: Update demand listings

## Open Standard Documentation

Smart Resource Connect advocates for an open standard for describing surplus resources and demands, facilitating global interoperability.

### Surplus Resource Schema

```json
{
  "id": "string",
  "title": "string",
  "description": "string",
  "category": "string",
  "quantity": "number",
  "unit": "string",
  "location": "string",
  "availableUntil": "string",
  "provider": "string",
  "status": "string",
  "postedAt": "string"
}
```

### Demand Schema

```json
{
  "id": "string",
  "title": "string",
  "description": "string",
  "category": "string",
  "quantity": "number",
  "unit": "string",
  "location": "string",
  "neededBy": "string",
  "requester": "string",
  "status": "string",
  "postedAt": "string"
}
```

### Best Practices

* Use standardized categories and units
* Provide clear and concise titles
* Include relevant details in descriptions
* Maintain consistent location data
* Regularly update listing statuses

## Licensing Recommendation

Smart Resource Connect employs an open-source licensing strategy:

* **Software Code:** Apache License 2.0
* **Content and Standards:** Creative Commons (CC BY 4.0)

This licensing ensures broad adoption, collaboration, and trust, allowing free use, modification, and distribution with proper attribution.

***

This documentation is structured for clarity and ease of integration into GitBook, emphasizing the open-source and open-standard nature of the Smart Resource Connect solution.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.smartresourceconnect.org/readme.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.
