This repository hosts a fully dynamic, production-ready portfolio application. The Next.js frontend connects directly to a modular Java 17 & Spring Boot 3.x backend powered by MongoDB.
- Centralized API Client: Next.js client (
src/lib/api.ts) fetches projects, case studies, skills, settings, process steps, and timeline milestones dynamically from the backend. - Fail-safe Offline Fallback: If the backend is offline, the frontend automatically falls back to static mock data, guaranteeing 100% uptime.
- MongoDB Atlas Integration: Automated data seeding of all database collections on the first startup.
- JWT Admin Panel Security: Secured REST endpoints supporting full CRUD operations.
- Aggregated Analytics & Search: Light tracking of visitor actions and ranked keyword scoring search query.
/backend: Spring Boot Maven project (Java 17 / Spring Boot 3.x)./src: Next.js App Router frontend codebase.
- Java Development Kit (JDK): Version 17 or higher.
- Apache Maven: Build tool.
- MongoDB: Local MongoDB instance (
mongodb://localhost:27017) or MongoDB Atlas URI.
You can configure the following environment variables (or let them fallback to default values in application.yml):
MONGODB_URI: The MongoDB connection string (Default:mongodb://localhost:27017/businessos).JWT_SECRET: Secret key for signing JWT tokens (Default: A pre-configured cryptographically secure key).ADMIN_USERNAME: Default administrator username (Default:admin).ADMIN_PASSWORD: Default administrator password (Default:admin123).
- Navigate to
/backend:cd backend - Build and compile:
mvn clean compile
- Run the Spring Boot application:
Note: On the first startup,
mvn spring-boot:run
DataSeedRunnerwill automatically populate MongoDB with default projects, case studies, skill categories, and timeline milestones.
Once the backend runs, you can query and audit the REST APIs interactively at:
- Swagger UI: http://localhost:8080/swagger-ui/index.html
- JSON API Specification: http://localhost:8080/v3/api-docs
- Node.js: Version 18 or higher.
- npm or yarn package manager.
Configure the backend connection in your environment variables:
NEXT_PUBLIC_API_URL: Path to the Spring Boot REST endpoints (Default:http://localhost:8080/api).
- Install dependencies:
npm install
- Launch Next.js in development mode:
The website runs on http://localhost:3000.
npm run dev