Store smarter, spend less
Space4It is a peer-to-peer marketplace for storage space rental, specifically designed for university students. Think Airbnb, but for storage space.
- Search & Explore: Browse available storage spaces with interactive maps
- List Your Space: Hosts can easily create and manage listings
- Booking System: Request, approve, and manage storage bookings
- Messaging: Real-time messaging between hosts and guests
- Reviews & Ratings: Rate experiences after completed bookings
- Student Verification: Automatic verification for .edu and .ac.uk email addresses
- Responsive Design: Fully responsive, works on mobile, tablet, and desktop
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Backend: Supabase (PostgreSQL, Auth, Storage, Realtime)
- Maps: Leaflet (OpenStreetMap)
- Deployment: Vercel
Before you begin, ensure you have:
- Node.js 18+ installed
- npm or yarn package manager
- A Supabase account (free tier works)
- Git (for version control)
git clone <your-repo-url>
cd Space4itnpm install- Go to supabase.com and create a free account
- Create a new project
- Wait for your project to be provisioned (takes a few minutes)
- Go to Settings β API to get your credentials:
- Project URL
anonpublic keyservice_rolesecret key (for seeding)
- In your Supabase dashboard, go to SQL Editor
- Copy the contents of
lib/database.types.sql - Paste and run the SQL script to create all tables, indexes, and RLS policies
- In Supabase dashboard, go to Storage
- Create a new bucket named
listing-photos - Set it to Public bucket
- (Optional) Set up policies to allow uploads from authenticated users
Create a .env.local file in the root directory:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# App Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000Important: Never commit .env.local to version control. It's already in .gitignore.
npm run devOpen http://localhost:3000 in your browser.
To populate your database with sample users, listings, bookings, and messages:
- Make sure your
.env.localfile is configured correctly - Run the seed script:
npm run seedThis will create:
- 5 sample users (mix of hosts and guests)
- 8 sample listings across different cities
- 3 sample bookings with different statuses
- Sample reviews and messages
Test Login Credentials:
- All seeded users have password:
password123 - Try logging in with:
alice@harvard.edubob@mit.educarol@nyu.edudavid@gmail.comemma@ucl.ac.uk
Space4it/
βββ app/ # Next.js App Router pages
β βββ dashboard/ # User dashboard
β βββ host/ # Host dashboard and listing management
β βββ listing/ # Listing detail pages
β βββ login/ # Authentication pages
β βββ search/ # Search and explore page
β βββ messages/ # Messaging pages
βββ components/ # React components
β βββ dashboard/ # Dashboard-specific components
β βββ ui/ # Reusable UI components
βββ lib/ # Utility functions and configurations
β βββ supabase/ # Supabase client setup
β βββ utils.ts # Helper functions
βββ scripts/ # Utility scripts
β βββ seed.ts # Database seeding script
βββ types/ # TypeScript type definitions
βββ public/ # Static assets
git add .
git commit -m "Initial commit"
git push origin main- Go to vercel.com and sign in
- Click New Project
- Import your GitHub repository
- Vercel will auto-detect Next.js settings
In Vercel dashboard:
- Go to your project β Settings β Environment Variables
- Add all variables from
.env.local:NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEY(if needed for server-side operations)NEXT_PUBLIC_APP_URL(your Vercel URL)
Vercel will automatically deploy your app. After deployment:
- Visit your Vercel URL
- Run the seed script locally to populate data, OR
- Use the Supabase SQL editor to run the seed data manually
- In Supabase dashboard, go to Authentication β URL Configuration
- Add your Vercel URL to Site URL
- Add your Vercel URL to Redirect URLs
- Row Level Security (RLS) is enabled on all tables
- Users can only access their own data
- Service role key should only be used server-side (never expose in client code)
- Always use environment variables for sensitive data
Currently, manual testing is recommended. In the future, you can add:
- Unit tests with Jest
- Integration tests with Playwright
- E2E tests for critical flows
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run seed- Seed database with sample data
- Verify your Supabase URL and keys are correct
- Check that RLS policies are set up correctly
- Ensure your Supabase project is active (not paused)
- Verify the
listing-photosbucket exists in Supabase Storage - Check bucket is set to Public
- Verify storage policies allow uploads
- Check redirect URLs in Supabase settings
- Verify email confirmation is disabled (for development) or handle email confirmation
- Clear browser cookies/localStorage if stuck in auth loop
This is a private project, but if you want to contribute:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is private and proprietary.
For issues or questions:
- Check the troubleshooting section above
- Review Supabase and Next.js documentation
- Check existing GitHub issues (if public)
- Primary: #CC9B7A (Claude tan/copper)
- Secondary: #1F1F1F (dark almost-black)
- Accent: #FFFFFF (white)
- Background: #F5F5F5 (light gray)
Built with β€οΈ for students who need storage space