Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
f52118b
refactor: reorganize HomePage layout and improve wallet connection ha…
JosueBrenes May 27, 2025
e07e978
Merge pull request #132 from byteworkscr/main
JosueBrenes May 27, 2025
52703e5
chore: remove .npmrc and .nvmrc files
JosueBrenes May 27, 2025
803ae5d
Merge pull request #133 from JosueBrenes/feat/dependencies
JosueBrenes May 27, 2025
7b125ee
refactor: remove ThemeToggle component from HeaderHome
JosueBrenes May 27, 2025
cb72b34
refactor: remove Firebase configuration from .env.example
JosueBrenes May 27, 2025
e86679a
Merge pull request #134 from JosueBrenes/develop
JosueBrenes May 27, 2025
1615568
refactor: remove ThemeToggle component from utils
JosueBrenes May 27, 2025
5517075
Merge pull request #135 from JosueBrenes/develop
JosueBrenes May 27, 2025
cb7cb67
Update README.md
JosueBrenes May 27, 2025
e0ab4ca
refactor: update Firebase configuration in .env.example
JosueBrenes May 27, 2025
936f547
fix: update Chat menu item href to include wallet parameter
JosueBrenes May 27, 2025
0708c00
feat: add Firebase initialization and Firestore configuration
JosueBrenes May 27, 2025
4e735c7
feat: create ChatPage component with ChatDialog
JosueBrenes May 27, 2025
137abbf
feat: implement chat functionality with message handling and initiali…
JosueBrenes May 27, 2025
0da18e2
feat: add wallet chat hook with message listening and error handling
JosueBrenes May 27, 2025
e377873
feat: refactor ChatDialog and MessageBubble components for improved m…
JosueBrenes May 27, 2025
71dfc2e
Merge branch 'develop' of https://github.com/JosueBrenes/dApp-TrustBr…
JosueBrenes May 27, 2025
39da7d8
Merge pull request #136 from JosueBrenes/develop
JosueBrenes May 27, 2025
fe26ae6
Update pull_request_template.md
JosueBrenes May 27, 2025
94dc22b
feat: remove outdated TrustBridge images and update favicon
JosueBrenes May 28, 2025
d605246
Merge branch 'trustbridgecr:develop' into develop
JosueBrenes May 28, 2025
4ada27d
Merge pull request #139 from JosueBrenes/develop
JosueBrenes May 28, 2025
b68310e
About us page has been created
drakkomaximo Jun 3, 2025
88e9614
About us page has been created v2
drakkomaximo Jun 3, 2025
867455a
Coderabbitai issues
drakkomaximo Jun 4, 2025
08c1531
Coderabbitai issues v2
drakkomaximo Jun 4, 2025
3b73048
feat: add UserProfile and UserProfileFormData interfaces for user man…
JoelVR17 Jun 5, 2025
0fed2d9
fix: toaster component
JoelVR17 Jun 5, 2025
cd47df1
feat: create SettingsPage component for user profile management with …
JoelVR17 Jun 5, 2025
2c6077f
feat: add Settings section to sidebar with Profile Settings link
JoelVR17 Jun 5, 2025
e640333
feat: add profile schema for user validation using Zod
JoelVR17 Jun 5, 2025
eea3636
feat: implement user profile creation on wallet connection
JoelVR17 Jun 5, 2025
c0951c2
fix: update wallet address handling in UserProfileForm to use context…
JoelVR17 Jun 5, 2025
04f25a5
feat: implement UserProvider for user profile management and update U…
JoelVR17 Jun 5, 2025
475b702
feat: display user profile name in TrustBridgeSidebar
JoelVR17 Jun 5, 2025
c80b889
feat: add ChatMessage and ChatWithMessages types for chat functionality
JoelVR17 Jun 5, 2025
16d7ca4
feat: implement ChatList component for displaying user chats with loa…
JoelVR17 Jun 5, 2025
f7a779d
feat: enhance ChatDialog with user data fetching and improved chat li…
JoelVR17 Jun 5, 2025
088a73e
feat: add useAllChats hook for real-time chat retrieval and enhance w…
JoelVR17 Jun 5, 2025
1ca0ba5
feat: add formatAddress utility function for address formatting
JoelVR17 Jun 5, 2025
494d12a
refactor: simplify convertTimestamp function and remove unused curren…
JoelVR17 Jun 5, 2025
90c530a
feat: initialize chat document if it doesn't exist and update wallet-…
JoelVR17 Jun 5, 2025
8d76662
Merge pull request #147 from JoelVR17/feat/user-profile
JosueBrenes Jun 5, 2025
3c32a41
Merge pull request #148 from JoelVR17/feat/improve-chat
JosueBrenes Jun 5, 2025
0e33e48
fix: adjust padding in ChatDialog layout for better responsiveness
JosueBrenes Jun 5, 2025
a8bbdbb
Merge pull request #149 from JosueBrenes/feat/update-project
JosueBrenes Jun 5, 2025
1d342d1
Update README.md
JosueBrenes Jun 11, 2025
3af0b5d
fix: ensure chat listeners clean up properly
JosueBrenes Jun 12, 2025
3f854b5
Merge pull request #152 from trustbridgecr/codex/detectar-y-corregir-…
JosueBrenes Jun 12, 2025
d6d166a
change: enable all wallets in kit
JosueBrenes Jun 14, 2025
7e494a8
force-enable lobstr and rabet
JosueBrenes Jun 14, 2025
c2314d8
chore: use explicit wallet modules
JosueBrenes Jun 14, 2025
82b6d01
Merge pull request #155 from trustbridgecr/codex/habilitar-todas-las-…
JosueBrenes Jun 14, 2025
a9b913f
style: improve layout and styling of HomePage component
JosueBrenes Jun 14, 2025
b20d75b
fix: add missing comma in wallet availability mapping
JosueBrenes Jun 14, 2025
71a2ad5
Merge pull request #156 from JosueBrenes/develop
JosueBrenes Jun 14, 2025
3150fee
Update README.md
JosueBrenes Jun 16, 2025
dbcb489
Add marketplace UI with sample loan offers
JosueBrenes Jun 16, 2025
ed78367
feat: implement marketplace functionality with loan offers and creati…
JosueBrenes Jun 16, 2025
a81eeb8
style: refactor Loans component header for improved layout and readab…
JosueBrenes Jun 16, 2025
62e70db
style: format dashboard page
JosueBrenes Jun 16, 2025
cf8592f
feat: enhance DashboardOverview with detailed user and wallet informa…
JosueBrenes Jun 16, 2025
2fef720
Merge pull request #158 from trustbridgecr/codex/sustituir-datos-quem…
JosueBrenes Jun 16, 2025
b218a46
feat: add marketplace link to sidebar
JosueBrenes Jun 16, 2025
0aeb241
style: enhance layout and readability of MarketplacePage component
JosueBrenes Jun 16, 2025
d5b7d06
Improve sidebar scroll
JosueBrenes Jun 16, 2025
12c7e24
Wrap dashboard content in ScrollArea
JosueBrenes Jun 16, 2025
e682568
Merge pull request #157 from trustbridgecr/codex/crear-apartado-marke…
JosueBrenes Jun 16, 2025
8a2b95f
feat: implement maintenance mode with countdown timer and related com…
JosueBrenes Jun 16, 2025
09f6365
Merge pull request #159 from JosueBrenes/develop
JosueBrenes Jun 16, 2025
f3e820f
fix: enable maintenance mode
JosueBrenes Jun 16, 2025
3ecaa93
fix: read maintenance env from both vars
JosueBrenes Jun 16, 2025
e80c46e
fix: correct maintenance mode environment variable and clean up layou…
JosueBrenes Jun 16, 2025
f0f604f
Merge pull request #160 from trustbridgecr/codex/arreglar-problema-co…
JosueBrenes Jun 16, 2025
b92fa38
Add About Us page and remove old About page implementation
JosueBrenes Jun 17, 2025
bd3f6c7
Refactor HeaderHome component to remove ThemeToggle and update layout…
JosueBrenes Jun 17, 2025
a037451
Remove ThemeToggle component to streamline header layout
JosueBrenes Jun 17, 2025
9a182ed
Add About Us page and implement useAboutData hook for dynamic content
JosueBrenes Jun 17, 2025
9655fd2
Merge branch 'develop' into feat/about-us-page-141
JosueBrenes Jun 17, 2025
ff13ef3
Merge pull request #146 from drakkomaximo/feat/about-us-page-141
JosueBrenes Jun 17, 2025
2bb3811
Refactor HeaderHome component to remove unnecessary export and clean …
JosueBrenes Jun 17, 2025
032c9f4
Merge pull request #161 from JosueBrenes/develop
JosueBrenes Jun 17, 2025
7f53a71
Refactor HomePage layout by removing unnecessary div wrapper and adju…
JosueBrenes Jun 17, 2025
ff6c4c7
Merge pull request #162 from JosueBrenes/develop
JosueBrenes Jun 17, 2025
4f701c4
Add ScrollArea to About Us page
JosueBrenes Jun 17, 2025
5bd5f4e
Merge pull request #163 from trustbridgecr/codex/agregar-barra-de-scr…
JosueBrenes Jun 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@

# Firbease configuration
NEXT_PUBLIC_FIREBASE_API_KEY=TU_API_KEY
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=TU_AUTH_DOMAIN
NEXT_PUBLIC_FIREBASE_PROJECT_ID=TU_PROJECT_ID
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=TU_STORAGE_BUCKET
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=TU_MESSAGING_SENDER_ID
NEXT_PUBLIC_FIREBASE_APP_ID=TU_APP_ID

# Trustless Work API
NEXT_PUBLIC_API_URL=https://dev.api.trustlesswork.com
NEXT_PUBLIC_API_KEY=TU_API_KEY


# FIREBASE
NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
NEXT_PUBLIC_FIREBASE_APP_ID=

# TRUSTLESS WORK
NEXT_PUBLIC_API_KEY=

# MAINTENANCE MODE
NEXT_PUBLIC_MAINTENANCE_MODE=false
NEXT_PUBLIC_COUNTDOWN_HOURS=2
NEXT_PUBLIC_COUNTDOWN_MINUTES=30
22 changes: 22 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,28 @@ Add here some information

- **Video**: [Link to Loom video](https://loom.com)

---

## βœ… ESLint Compliance (Mandatory)

To ensure that the code follows project standards, please run the following command and attach a screenshot of the output:

```bash
npm run lint
```

You should see:

```
βœ” No ESLint warnings or errors
```

πŸ“Έ **Attach a screenshot showing the result of the lint check:**

> ⚠️ **Pull requests without this screenshot will be rejected.**

---

## πŸ“‚ Related Issue

<!-- Link the related issue so it automatically closes when this pull request is merged. -->
Expand Down
3 changes: 0 additions & 3 deletions .npmrc

This file was deleted.

1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

17 changes: 3 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# πŸš€ TrustBridge
![ ](https://github.com/user-attachments/assets/9201806d-7116-44d7-9df0-6f73c6f3d3f3)

# TrustBridge

**TrustBridge** is a decentralized lending platform built on the Stellar blockchain and integrated with Trustless Work for smart contract management. It enables users to request and fund secure loans, ensuring transparency, automation, and security without traditional intermediaries.

Expand Down Expand Up @@ -76,7 +78,6 @@ NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=TU_MESSAGING_SENDER_ID
NEXT_PUBLIC_FIREBASE_APP_ID=TU_APP_ID

# Trustless Work API
NEXT_PUBLIC_API_URL=https://dev.api.trustlesswork.com
NEXT_PUBLIC_API_KEY=TU_API_KEY
```

Expand All @@ -94,18 +95,6 @@ https://github.com/user-attachments/assets/0c4a8a80-33f1-41ae-819b-6a38abf30e4b

---

## πŸ”₯ Firebase Setup

Once you have your Firebase database ready, add the following document in the `trustlines` collection:

```
name: "USDC" (string)
trustline: "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5" (string)
trustlineDecimals: 10000000 (number)
```

---

## πŸ”‘ Wallet Requirements

To use this platform, install one of the following wallets:
Expand Down
23 changes: 19 additions & 4 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
/* config options here */
/** @type {import('next').NextConfig} */
const nextConfig = {
env: {
NEXT_PUBLIC_MAINTENANCE_MODE: process.env.MAINTENANCE_MODE,
},
// Add configuration for handling static files
async headers() {
return [
{
source: "/locales/:path*",
headers: [
{
key: "Cache-Control",
value: "public, max-age=3600", // Cache for 1 hour
},
],
},
];
},
};

export default nextConfig;
25 changes: 12 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"eslint": "^9.23.0",
"eslint-config-next": "15.2.4",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-prettier": "^5.2.5",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-react": "^7.37.4",
"globals": "^16.0.0",
"husky": "^9.1.7",
Expand Down
Binary file removed public/img/TrustBridge-dark.png
Binary file not shown.
Binary file removed public/img/TrustBridge-light.png
Binary file not shown.
Binary file modified public/img/TrustBridge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions src/@types/chat.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,21 @@ export interface ChatState {
chats: Chat[];
activeChat: Chat | null;
}

export type ChatMessage = {
id: string;
from: string;
to: string;
content: string;
timestamp: number;
status?: "sent" | "delivered" | "read";
};

export type ChatWithMessages = {
id: string;
participants: string[];
lastMessage: string | null;
lastMessageTime: number | null;
createdAt: number;
messages: ChatMessage[];
};
22 changes: 22 additions & 0 deletions src/@types/user.entity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export interface UserProfile {
walletAddress: string;
firstName: string;
lastName: string;
country: string;
phoneNumber: string;
createdAt: number;
updatedAt: number;
}

export interface UserProfileFormData {
firstName: string;
lastName: string;
country: string;
phoneNumber: string;
}

export interface UserChatData {
firstName: string;
lastName: string;
walletAddress: string;
}
17 changes: 17 additions & 0 deletions src/app/about-us/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"use client";

import AboutPage from "@/components/modules/about-us/ui/pages/AboutUs";
import { GradientBackground } from "@/components/modules/dashboard/ui/pages/background/GradientBackground";
import { ScrollArea } from "@/components/ui/scroll-area";

export default function Page() {
return (
<GradientBackground>
<ScrollArea className="h-screen">
<div className="p-6">
<AboutPage />
</div>
</ScrollArea>
</GradientBackground>
);
}
6 changes: 6 additions & 0 deletions src/app/dashboard/chat/[wallet]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"use client";
import { ChatDialog } from "@/components/modules/chat/ui/dialogs/ChatDialog";

export default function ChatPage() {
return <ChatDialog />;
}
7 changes: 1 addition & 6 deletions src/app/dashboard/chat/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
"use client";

import { ChatDialog } from "@/components/modules/chat/ui/dialogs/ChatDialog";

export default function ChatPage() {
return (
<div className="flex flex-col flex-1 h-[calc(100vh-56px)] w-full">
<ChatDialog />
</div>
);
return <ChatDialog />;
}
12 changes: 4 additions & 8 deletions src/app/dashboard/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
"use client";

import type React from "react";
import { SidebarProvider } from "@/components/ui/sidebar";
import { TrustBridgeSidebar } from "@/components/layouts/sidebar/Sidebar";
import { Header } from "@/components/layouts/header/Header";
import { ScrollArea } from "@/components/ui/scroll-area";

const Layout = ({ children }: { children: React.ReactNode }) => {
return (
<SidebarProvider>
<div className="flex h-screen w-full">
<TrustBridgeSidebar />
<div className="flex-1 ">
<div className="z-index-10000">
<Header />
</div>
{children}
<div className="flex-1 flex flex-col">
<Header />
<ScrollArea className="flex-1">{children}</ScrollArea>
</div>
</div>
</SidebarProvider>
Expand Down
5 changes: 5 additions & 0 deletions src/app/dashboard/marketplace/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { MarketplacePage } from "@/components/modules/marketplace/ui/pages/MarketplacePage";

export default function Page() {
return <MarketplacePage />;
}
6 changes: 1 addition & 5 deletions src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { DashboardOverview } from "@/components/modules/dashboard/ui/pages/DashboardPage";

export default function Page() {
return (
<div className="h-screen overflow-auto">
<DashboardOverview />
</div>
);
return <DashboardOverview />;
}
23 changes: 23 additions & 0 deletions src/app/dashboard/profile/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"use client";

import { UserProfileForm } from "@/components/modules/profile/ui/UserProfileForm";
import { useWalletContext } from "@/providers/wallet.provider";
import { Card } from "@/components/ui/card";

export default function SettingsPage() {
const { walletAddress } = useWalletContext();

if (!walletAddress) {
return (
<div className="flex items-center justify-center h-full">
<Card className="p-8">
<p className="text-muted-foreground text-center">
Wallet not connected or invalid target.
</p>
</Card>
</div>
);
}

return <UserProfileForm />;
}
Binary file modified src/app/favicon.ico
Binary file not shown.
6 changes: 5 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { GlobalProvider } from "@/providers/global.provider";
import { Toaster } from "sonner";

const geistSans = Geist({
variable: "--font-geist-sans",
Expand Down Expand Up @@ -29,7 +30,10 @@ export default function RootLayout({
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<GlobalProvider>{children}</GlobalProvider>
<GlobalProvider>
{children}
<Toaster />
</GlobalProvider>
</body>
</html>
);
Expand Down
23 changes: 23 additions & 0 deletions src/app/maintenance/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"use client";

import { Bounded } from "@/components/layouts/Bounded";
import CountdownTimer from "@/components/modules/maintenance/ui/CountdownTimer";

const Maintenance: React.FC = () => {
return (
<Bounded center={true} className="mt-20">
<div className="flex flex-col justify-center items-center w-full mt-10 md:mt-16 gap-4 text-center">
<h1 className="text-5xl md:text-6xl font-bold">
Site Under Maintenance
</h1>
<p className="text-xl text-muted-foreground">
We are making improvements to our platform to provide you with better
service.
</p>
<CountdownTimer />
</div>
</Bounded>
);
};

export default Maintenance;
Loading