Contributing to GAuth
We welcome contributions to GAuth! Whether you're fixing a bug, improving documentation, or adding a new feature, your help is appreciated.
Development Setup
Since GAuth is a static HTML5 application, the development setup is very straightforward.
-
Fork and Clone the Repository
First, fork the repository on GitHub. Then, clone your fork to your local machine:
git clone https://github.com/YOUR_USERNAME/gauth.git cd gauth
-
Install Dependencies
The project has minimal dependencies, primarily for development and testing. Install them using npm:
npm install
-
Run a Local Server
To test your changes, you need to serve the project files from a local web server. See the Installation & Self-Hosting guide for examples.
Running Tests
GAuth uses Mocha and expect.js for testing. The tests are run directly in the browser.
To run the test suite, simply open the test/index.html
file in your web browser. The results will be displayed on the page.
Project Structure
index.html
: The single HTML file that contains the layout for all pages (main
,add
,settings
,about
).js/gauth.js
: The core application logic. This file contains theKeyUtilities
for TOTP generation, theStorageService
forlocalStorage
interaction, and theKeysController
which manages the UI.js/main.js
: Initializes theKeysController
when the main page is created.css/
: Contains the stylesheets for the application.lib/
: Contains third-party JavaScript libraries like jQuery, jsSHA, and FileSaver.js.test/
: Contains the test suite files.
Submitting Changes
-
Create a Feature Branch:
git checkout -b my-awesome-feature
-
Make Your Changes:
Make your code changes and commit them with a clear commit message.
-
Push to Your Fork:
git push origin my-awesome-feature
-
Open a Pull Request:
Go to the GAuth repository on GitHub and open a pull request from your fork. Provide a clear description of the changes you have made.
License
By contributing to GAuth, you agree that your contributions will be licensed under the GPL-3.0 License, as specified in the package.json
file.