S7
Sook7

Buy & Sell in Morocco

Sook7 is the trusted marketplace for Moroccans to buy, sell, and rent properties, cars, and more.

Browse Categories

Cars

Find new and used cars from trusted sellers across Morocco

Browse Cars

Rent Property

Apartments, houses, villas, and commercial spaces for rent

Browse Rentals

Sell Property

List your property for sale - houses, apartments, land, and more

Browse Properties

Other Items

Electronics, furniture, fashion, and various used items

Browse Items

How Sook7 Works

1

Register

Sign up with your mobile number and email to create your account

2

List Items

Add your items, properties, or cars with photos and descriptions

3

Connect & Sell

Communicate with buyers, negotiate, and complete your transactions

Featured Listings

View All
For Sale

Modern Apartment in Casablanca

3 bedrooms, 2 bathrooms, 120m²

850,000 MAD
For Rent

Villa in Marrakech

4 bedrooms, 3 bathrooms, pool, 250m²

12,000 MAD/mo
For Sale

Renault Duster 2020

Diesel, Automatic, 45,000 km

185,000 MAD

Ready to Start Buying & Selling?

Join thousands of Moroccans who are already using Sook7 to find great deals and sell their items.

// API Base URL - Update this to match your server const API_BASE = 'http://localhost/sook7-backend/api'; // API Service functions const apiService = { // Auth endpoints async register(userData) { const response = await fetch(`${API_BASE}/auth/register.php`, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(userData) }); return await response.json(); }, async login(credentials) { const response = await fetch(`${API_BASE}/auth/login.php`, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(credentials) }); return await response.json(); }, async logout() { const response = await fetch(`${API_BASE}/auth/logout.php`, { method: 'POST' }); return await response.json(); }, // Listings endpoints async getFeaturedListings() { const response = await fetch(`${API_BASE}/listings/index.php?featured=true`); return await response.json(); }, async getListings(params = {}) { const queryString = new URLSearchParams(params).toString(); const response = await fetch(`${API_BASE}/listings/index.php?${queryString}`); return await response.json(); }, async getListing(id) { const response = await fetch(`${API_BASE}/listings/show.php?id=${id}`); return await response.json(); }, async createListing(listingData) { const response = await fetch(`${API_BASE}/listings/create.php`, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(listingData) }); return await response.json(); }, // Categories endpoint async getCategories() { const response = await fetch(`${API_BASE}/categories/index.php`); return await response.json(); } }; // Update your form submissions to use the API document.getElementById('registerForm').addEventListener('submit', async function(e) { e.preventDefault(); const formData = { name: document.getElementById('registerName').value, email: document.getElementById('registerEmail').value, mobile: document.getElementById('registerMobile').value, password: document.getElementById('registerPassword').value }; try { const result = await apiService.register(formData); if(result.message.includes('successfully')) { alert('Registration successful! You can now login.'); document.getElementById('registerModal').classList.add('hidden'); } else { alert('Registration failed: ' + result.message); } } catch (error) { alert('Registration failed: ' + error.message); } }); document.getElementById('loginForm').addEventListener('submit', async function(e) { e.preventDefault(); const formData = { email: document.getElementById('loginEmail').value, password: document.getElementById('loginPassword').value }; try { const result = await apiService.login(formData); if(result.message.includes('successful')) { alert('Login successful!'); document.getElementById('loginModal').classList.add('hidden'); // Update UI to show logged in state updateAuthUI(result.user); } else { alert('Login failed: ' + result.message); } } catch (error) { alert('Login failed: ' + error.message); } }); function updateAuthUI(user) { // Update header to show user is logged in const authButtons = document.querySelector('.flex.items-center.space-x-4'); authButtons.innerHTML = ` Welcome, ${user.name} `; document.getElementById('logoutBtn').addEventListener('click', async function() { await apiService.logout(); location.reload(); }); } // Load featured listings on page load document.addEventListener('DOMContentLoaded', async function() { try { const featuredListings = await apiService.getFeaturedListings(); // Update the featured listings section with real data updateFeaturedListings(featuredListings.listings); } catch (error) { console.error('Failed to load featured listings:', error); } }); function updateFeaturedListings(listings) { const listingsContainer = document.querySelector('.grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3.gap-6'); if(listings && listings.length > 0) { listingsContainer.innerHTML = listings.map(listing => `
${listing.images && listing.images.length > 0 ? `${listing.title}` : `
` } ${listing.type === 'sale' ? 'For Sale' : 'For Rent'}

${listing.title}

${listing.location}

${formatPrice(listing.price, listing.type)}
`).join(''); } } function formatPrice(price, type) { if(!price) return 'Price on request'; return new Intl.NumberFormat('en-MA', { style: 'currency', currency: 'MAD' }).format(price) + (type === 'rent' ? '/mo' : ''); }