Prerequisites
Before starting development, ensure you have the following installed on your system:Node.js
Install Node.js version 18.0.0 or higher. The project uses modern JavaScript features and requires a recent Node.js version.
PostgreSQL
Install PostgreSQL 13 or higher for the database. The schema uses modern PostgreSQL features including:
- Full-text search with
tsvector - GIN indexes
- Triggers and functions
Installation
Install dependencies
Install all required npm packages using npm:This will install all dependencies including:
- React 19.2.3 - UI framework
- TanStack Router - Type-safe routing
- Vite 7 - Build tool and dev server
- TypeScript 5.8.3 - Type safety
- Tailwind CSS - Styling
- Better Auth - Authentication
- Leaflet & Google Maps - Map integrations
- Lucide React - Icon library
Set up the database
Create a PostgreSQL database and run the schema:
The schema file includes all table definitions, indexes, triggers, and sample data for property types, operation types, features, and tags.
Configure environment variables
Create a See the Configuration page for all available environment variables.
.env file in the project root with the required environment variables:Development Server
Start the development server with hot module replacement:http://localhost:5173 (default Vite port).
Vite provides instant hot module replacement (HMR) for a fast development experience. Changes to your code will be reflected immediately without a full page reload.
Available Scripts
The following npm scripts are available:Verify Installation
To verify your setup is correct:Test database connection
Verify PostgreSQL is running and accessible:Should return 14 property types if the schema was loaded correctly.
Backend API Setup
The default API endpoint ishttp://localhost:10000/api. The API base URL is determined by:
VITE_API_URLenvironment variable (highest priority)- Falls back to
http://localhost:10000/apiin both development and production
src/lib/api.ts:7-17 for the API base URL configuration logic.
Troubleshooting
Port 5173 is already in use
Port 5173 is already in use
Vite will automatically try the next available port. You can also specify a custom port:
Module not found errors
Module not found errors
Clear node_modules and reinstall:
Database connection errors
Database connection errors
Verify PostgreSQL is running:Check your database credentials and connection settings in the backend configuration.
TypeScript errors
TypeScript errors
Ensure you’re using TypeScript 5.8.3:Restart your IDE’s TypeScript server if errors persist.
Next Steps
Now that your environment is set up:- Review the Database Schema to understand the data model
- Learn about Configuration options
- Start developing with TanStack Router for routing
- Explore the API Reference for available endpoints