The safest way to buy and sell crypto in Latin America. An open-source P2P marketplace building a community of trust through on-chain reputation.
This is the foundational bedrock for the Confianza Testnet MVP. The project includes:
- ✅ Complete database architecture with security policies
- ✅ Next.js 14+ with App Router and TypeScript
- ✅ Tailwind CSS for styling
- ✅ Supabase integration with Row Level Security
- ✅ Clean component architecture
- ✅ Responsive design foundation
- Framework: Next.js 14+ (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Database: Supabase (PostgreSQL)
- Deployment: Vercel-ready
- Blockchain: Base Goerli Testnet
src/
├── app/
│ ├── layout.tsx # Main layout with Navbar/Footer
│ ├── page.tsx # Home page
│ └── globals.css # Global styles
├── components/
│ ├── Navbar.tsx # Navigation component
│ └── Footer.tsx # Footer component
├── lib/
│ └── supabase.ts # Supabase client
└── types/
└── database.ts # TypeScript database types
The complete database architecture includes:
- profiles - User profile information
- admins - Platform administrators
- wallets - User wallet addresses
- trust_scores - User reputation metrics
- offers - Trading offers
- trades - Trade transactions
- disputes - Dispute management
- feedback - User ratings and reviews
All tables have comprehensive Row Level Security (RLS) policies implemented.
-
Clone the repository
git clone <repository-url> cd confianza-app
-
Install dependencies
npm install
-
Set up Supabase
- Create a new Supabase project
- Run the migration file:
supabase/migrations/create_confianza_schema.sql
- Copy your project URL and anon key
-
Configure environment variables Create
.env.local
with your Supabase credentials:# Supabase Configuration NEXT_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key-here # Database Configuration (for edge functions) SUPABASE_URL=https://your-project-id.supabase.co SUPABASE_SERVICE_ROLE_KEY=your-service-role-key-here # Next.js Configuration NEXT_PUBLIC_SITE_URL=http://localhost:3000
-
Run the development server
npm run dev
- Row Level Security (RLS) enabled on all database tables
- Secure by default - deny all access, then grant specific permissions
- Admin controls for platform management
- User data isolation - users can only access their own data
- Public data controls - careful exposure of necessary public information
The platform implements a comprehensive trust scoring system:
- Unverified - New users (gray)
- Bronze - Basic verification (bronze)
- Silver - Established traders (silver)
- Gold - Highly trusted users (gold)
Trust scores are calculated based on:
- Total number of trades
- Success rate
- Dispute history
- Community feedback
- Trade volume
The application is fully responsive with:
- Mobile-first approach
- Tailwind CSS utilities
- Clean, professional design
- Accessibility considerations
The project is configured for seamless deployment on Vercel:
npm run build
This is an open-source project. Contributions are welcome!
MIT License - see LICENSE file for details.
Building the safest P2P crypto trading platform for Latin America through:
- Transparent on-chain reputation
- Community-driven trust
- Open-source development
- Security-first approach
Note: This is a testnet implementation running on Base Goerli. No real money is handled in this version.