A lightweight Node.js application for hosting Java projects and serving them as Maven/Gradle dependencies. No native build required - just npm install!
- HTTP/HTTPS Support: Switch between protocols via config
- Auto Certificate Reload: Automatically reloads when PEM files change (great for Let's Encrypt)
- Web UI: Login, upload, and browse project files
- ZIP Upload: Upload Java projects as ZIP files, auto-detects
src/mainfolder - GitHub Integration: Clone public repositories directly from GitHub URL with one-click updates
- Maven Repository: Serve projects as Maven/Gradle dependencies
- File Browser: View and explore uploaded project files
- User Management: Admin can create, delete, and reset passwords for users
- Password Security: Forces password change when using default credentials
- Project Search & Sort: Search projects by name/user, sort by date/user/name
- Project Ownership: Tracks which user uploaded each project
# Install dependencies (no native builds required)
npm install
# Start the server
npm startThe server will start on http://localhost:3000 by default.
- Username:
admin - Password:
admin123
Note: You will be prompted to change the password on first login with default credentials.
Edit config.json to customize the application:
{
"server": {
"port": 3000,
"host": "0.0.0.0",
"protocol": "http"
},
"https": {
"keyPath": "./certs/server.key",
"certPath": "./certs/server.crt",
"watchCerts": true
},
"auth": {
"sessionSecret": "change-this-to-a-secure-random-string",
"users": [...],
"defaultPassword": "admin123"
},
"storage": {
"uploadDir": "./uploads",
"projectsDir": "./projects",
"tempDir": "./temp"
},
"repository": {
"basePath": "/repo",
"groupId": "com.example",
"artifactId": "project"
}
}| Option | Description |
|---|---|
server.port |
Port number to listen on |
server.host |
Host address to bind to |
server.protocol |
http or https |
https.keyPath |
Path to SSL private key PEM file |
https.certPath |
Path to SSL certificate PEM file |
https.watchCerts |
Auto-reload when certificates change |
auth.sessionSecret |
Secret for session encryption (change this!) |
auth.users |
Array of user objects with hashed passwords |
auth.defaultPassword |
Fallback password for quick setup |
storage.uploadDir |
Temporary upload directory |
storage.projectsDir |
Permanent project storage |
storage.tempDir |
Temp directory for extraction |
repository.basePath |
URL path for repository |
repository.groupId |
Default Maven groupId |
- Set
protocoltohttpsin config.json - Place your certificate files:
./certs/server.key- Private key./certs/server.crt- Certificate
# Generate self-signed certificates for testing
mkdir -p certs
openssl req -x509 -newkey rsa:4096 -keyout certs/server.key -out certs/server.crt -days 365 -nodes -subj "/CN=localhost"The server automatically reloads certificates when they change (useful for Let's Encrypt auto-renewal).
- Log in as admin
- Go to Settings (⚙️ button in header)
- Use the User Management section to:
- Add new users
- Reset user passwords
- Delete users (except admin)
Generate a password hash:
node scripts/hash-password.js yourpasswordAdd the user to config.json:
{
"auth": {
"users": [
{
"username": "admin",
"password": "$2a$10$..."
}
]
}
}- Log in at
http://localhost:3000 - Go to Files page
- Drop or select a ZIP file containing your Java project
- The app automatically finds the
src/mainfolder
- Log in at
http://localhost:3000 - Go to Files page
- Enter a public GitHub repository URL (e.g.,
https://github.com/owner/repo) - Click "Clone" to import the repository
- Use the refresh button (↻) on GitHub projects to pull the latest changes
project.zip
└── my-project/
├── pom.xml (or build.gradle)
└── src/
└── main/
└── java/
└── ...
After uploading a project, it's available as a Maven dependency.
<repositories>
<repository>
<id>custom-repo</id>
<url>http://localhost:3000/repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.example</groupId>
<artifactId>your-project-name</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>repositories {
maven { url 'http://localhost:3000/repo' }
}
dependencies {
implementation 'com.example:your-project-name:1.0.0'
}GET /auth/login- Login pagePOST /auth/login- Login handlerGET /auth/logout- LogoutGET /auth/settings- Settings pageGET /auth/me- Get current user infoPOST /auth/change-password- Change passwordGET /auth/users- List users (admin only)POST /auth/users- Create user (admin only)PUT /auth/users/:username/password- Reset user password (admin only)DELETE /auth/users/:username- Delete user (admin only)
GET /files- File manager UIGET /files/api/projects- List projectsGET /files/api/projects/:name- Get project detailsGET /files/api/projects/:name/file?path=...- View file contentPOST /files/api/upload- Upload ZIP fileDELETE /files/api/projects/:name- Delete projectPOST /files/api/clone- Clone from GitHub URLPOST /files/api/projects/:name/update- Update project from GitHub
GET /repo- Repository browser UIGET /repo/api/artifacts- List available artifactsGET /repo/{groupId}/{artifactId}/{version}/{file}- Serve artifact files
.
├── config.json # Application configuration
├── package.json # Dependencies
├── src/
│ ├── server.js # Main server entry point
│ ├── routes/
│ │ ├── auth.js # Authentication routes
│ │ ├── files.js # File management routes
│ │ └── repo.js # Repository routes
│ ├── middleware/
│ │ └── auth.js # Auth middleware
│ └── utils/
│ ├── fileUtils.js # File utilities
│ └── password.js # Password hashing
├── views/
│ ├── login.html # Login page
│ ├── files.html # File manager
│ ├── repo.html # Repository browser
│ └── settings.html # Settings & user management
├── public/ # Static assets
├── certs/ # SSL certificates (for HTTPS)
├── uploads/ # Temporary uploads
├── projects/ # Stored projects
└── temp/ # Temporary extraction
MIT