This is a simple Flask web application to generate and manage license keys for software, and a demo application to simulate a licensed software's behavior. The app uses in-memory data structure (a list of dictionaries) for data storage.
The application consists of the following files:
application/app.py
: A demo application simulating a licensed software's behavior, validating license keys against the licensing server.licensingSolution/main.py
: The main server-side logic for the key generation and management system (licensing server).licensingSolution/templates/index.html
: The homepage of the licensing server.licensingSolution/templates/keygen.html
: The page for key generation.licensingSolution/static/script.js
: The client-side JavaScript file.licensingSolution/static/styles.css
: The CSS file for styling the web pages.
- Clone the repository:
git clone <repository url>
. - Navigate into the project directory:
cd <project directory>
. - If you have not yet created a Conda environment, you can do so by using the following command:
conda create -n webdev python=3.11
. - Activate the Conda environment:
conda activate webdev
. - Install the required packages:
pip install -r requirements.txt
. - Run the licensing server:
python licensingSolution/main.py
. - In a separate terminal, with the same Conda environment active, run the demo application:
python application/app.py
.
- Open your web browser and go to
localhost:8090
. - On the homepage, you can see the list of already generated keys. You can toggle the active state of any key by clicking on the 'Yes' or 'No' in the 'Active' column.
- Click on the 'Generate a Key' button to generate a new key. A modal will appear where you can enter the number of days for the key to expire. If you don't provide any value, it defaults to 30 days.
- Click the 'Generate' button in the modal to generate the key. The key will appear in the keys list.
- Refresh the page to load the keys from the server.
- Run the application using the command
python application/app.py
. - The application will ask for a license key. Enter a key from the licensing server.
- If the key is valid and active, the application will print "License key valid. Starting application..." and you can proceed with using the application. If not, the application will provide an appropriate error message.
Given the vision of providing a robust, user-friendly, and secure licensing solution for software and application developers, our project can take the following paths:
- Expand the Feature Set - Additional features could be key expiration notifications, renewal of keys, and different licensing models (like perpetual, term, concurrent, etc.)
- Testing - Conduct thorough testing of the system for any bugs or security issues.
- User Interface Improvement - Plan for a more user-friendly and attractive interface.
- Documentation - Prepare comprehensive documentation for your project, including installation, usage, and internal workings. Create guides or tutorials for integration with popular software development frameworks.
- Scalability - Ensure that the system can handle the increased load with more users.
- Integration with Payment Gateways - Automate the process of issuing keys upon payment.
- API Development - Provide an API for the system so that it can be integrated into other software or services.
- Cross-Platform Support - Develop versions for different platforms like Windows, MacOS, Linux, and even mobile platforms.
- Customer Support - Set up a system to handle customer support requests efficiently, such as a ticketing system or a support forum.
- Completion of Feature Set Expansion - Adding features like key expiration notifications, renewal of keys, different licensing models, etc.
- Completion of Initial Testing Phase - After thorough testing of the system, all identified bugs should be fixed.
- User Interface Redesign - Redesign of the interface to improve user experience.
- Completion of Documentation - Detailed documentation for users and contributors is completed.
- Scalability Achieved - The system is able to handle a large number of users without performance degradation.
- Integration with Payment Gateways - The system is now capable of issuing keys automatically upon payment.
- API Development - The API for your system is fully functional and documented.
- Cross-Platform Support - The system is now able to run on multiple platforms.
- Database Integration - Better persistence and scalability with a database.
- User Accounts - Associate keys with user accounts for easier management and customer support.
- Key Analytics - Provide analytics on key usage, like how many active keys there are, how many have expired, etc.
- Robust Security - Continuously review and enhance security measures. This could involve encryption of sensitive data, regular audits, and vulnerability assessments.
- Localization - Increase the accessibility of your product by adding support for multiple languages.