Get up and running quickly
This guide will help you clone the repository, install dependencies, and start both the frontend and backend servers.Before you begin, ensure you have Node.js 20 (LTS) or higher and npm installed on your system. PostgreSQL must also be installed and running.
Clone the repository
Clone the F1 PitLane Predict repository to your local machine:This creates a local copy of the project and navigates into the project directory.
Install frontend dependencies
Install all required dependencies for the Vue.js frontend:This installs packages including:
- Vue.js 3 and Vue Router
- Vuex for state management
- Prisma Client for database access
- Axios for HTTP requests
- TypeScript and Vite build tools
The installation may take a few minutes depending on your internet connection.
Install backend dependencies
Navigate to the server directory and install backend dependencies:This installs:
- Nitropack for the server framework
- bcrypt for password hashing
Configure the database
Set up your PostgreSQL database connection by creating a Replace
.env file in the root directory:.env
username and password with your PostgreSQL credentials.Generate Prisma Client
Generate the Prisma Client based on your schema:Optionally, run migrations to create the database tables:
Start the frontend server
Launch the Vue.js development server:You should see output similar to:The frontend is now accessible at
http://localhost:5173.Verify your setup
Once both servers are running, you can verify the setup:http://localhost:5555.
Common issues
Port already in use
Port already in use
If port 5173 or 3000 is already in use, you can either:
- Stop the process using that port
- Change the port in
vite.config.ts(frontend) ornitro.config.ts(backend)
Database connection failed
Database connection failed
Verify that:
- PostgreSQL is running on your system
- The
DATABASE_URLin your.envfile is correct - The database exists (create it with
createdb f1_pitlane_predict) - Your PostgreSQL user has the necessary permissions
Module not found errors
Module not found errors
Try deleting
node_modules and reinstalling:Next steps
Detailed installation
Learn more about each component and configuration option
API reference
Explore available API endpoints and their usage
Database schema
Understand the data models and relationships
Development guide
Best practices for developing with F1 PitLane Predict