Get your Portfolio Hub API up and running, create your first user account, and make authenticated API requests.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/LavenderEdit/Portfolio/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, ensure you have the following installed on your system:Java 21 (JDK)
Required to run the Spring Boot application
Maven 3.9+
Build tool for managing dependencies
MySQL 8.0+
Database for storing portfolio data
Git
Version control for cloning the repository
You can verify your installations by running:
Step 1: Clone and Setup
Create MySQL database
Create a new MySQL database for the application:
Flyway will automatically create all required tables when you first run the application.
Step 2: Run the Application
Start the Portfolio Hub API server:http://localhost:8080
Step 3: Register Your First User
Create a new user account using the/api/auth/register endpoint:
Request Requirements
TheRegisterRequest accepts the following fields:
| Field | Type | Validation | Description |
|---|---|---|---|
fullName | string | 3-120 characters, required | User’s full name |
email | string | Valid email, max 150 characters, required | User’s email address |
password | string | Min 8 characters, max 100, required | Account password |
Successful Response
The API automatically creates a profile for each new user and returns a JWT token that you can use immediately.
Step 4: Login to Your Account
Authenticate with your credentials to obtain a JWT token:Successful Response
Step 5: Make Your First Authenticated Request
Use the JWT token to access protected endpoints. Let’s fetch your profile:Successful Response
Step 6: Update Your Profile
Now let’s update your profile with additional information:Successful Response
Next Steps
Congratulations! You’ve successfully set up Portfolio Hub API and made your first authenticated requests. Here’s what you can explore next:Authentication
Learn about JWT tokens, security, and session management
API Reference
Explore all available endpoints and their usage
Managing Portfolios
Add projects, experiences, education, and skills
File Uploads
Upload avatars, resumes, and project images to Google Drive
Common Issues
Connection refused to MySQL
Connection refused to MySQL
Ensure MySQL is running and accessible on the configured host and port:Check that the
MYSQL_HOST, MYSQL_PORT, MYSQL_USER, and MYSQL_PASSWORD environment variables are correctly set.Invalid JWT token error
Invalid JWT token error
JWT tokens expire based on the
JWT_EXPIRATION_TIME setting (default: 60 minutes). If you receive a 401 Unauthorized error, login again to get a fresh token.Flyway migration errors
Flyway migration errors
If you encounter Flyway migration issues, ensure your database schema is empty on first run. Flyway will create all necessary tables automatically.To reset the database:
Port 8080 already in use
Port 8080 already in use
If port 8080 is already in use, you can change the server port by adding:Or add to
application.properties: