A full-stack application for managing software licenses with a NestJS backend and Next.js frontend.
- Node.js (v14 or higher)
- PostgreSQL (v12 or higher)
- npm or yarn
- Install PostgreSQL if you haven't already
- Make sure PostgreSQL service is running
- The application will automatically create the database and tables on first start
-
Navigate to the backend directory:
cd backend
-
Copy the example environment file and update it with your database credentials:
cp .env.example .env
Installs all dependencies for both the backend and frontend. This command:
- Runs
npm install
in the backend directory - Runs
npm seed
in the backend directory - Runs
npm install
in the frontend directory
Usage example:
npm run install:all
To run both the backend and frontend concurrently, you can use the following command from the root directory:
npm run start:all
This command will start both the backend server and the frontend development server simultaneously. The server will run on http://localhost:3000 The frontend will run on http://localhost:3001
The following commands are available in the root package.json:
Adds license checking functionality to your JavaScript files. This command:
- Processes your core JavaScript files
- Adds license verification logic
- Creates the necessary modifications for license checking
Obfuscates the modified core JavaScript file for security. This command:
- Takes the modified core file (backend/public/core_modified.js)
- Applies code obfuscation using javascript-obfuscator
- Outputs the obfuscated version to backend/public/ocore.js
- Uses configuration from obfuscator-config.json
Usage example:
# First add license checking
npm run add-license-check
# Then obfuscate the modified file
npm run obfuscate
- License Management Dashboard
- View all licenses in a table format
- Add new licenses
- Edit existing licenses
- Delete licenses
- License Verification API
- Endpoint: POST /api/check-license
- Parameters: url, token
- Returns license validity status
- User Authentication
- JWT-based authentication
- Protected routes
- Admin user management
- POST /api/auth/login - Login with email and password
{ "email": "[email protected]", "password": "admin123" }
- GET /api/licenses - Get all licenses (requires authentication)
- POST /api/licenses - Create a new license (requires authentication)
- PUT /api/licenses/:id - Update a license (requires authentication)
- DELETE /api/licenses/:id - Delete a license (requires authentication)
- POST /api/check-license - Verify a license (public endpoint)
{ "url": "example.com", "token": "license-token" }
- JWT-based authentication
- Password hashing with bcrypt
- Protected API endpoints
- CORS enabled
- Input validation