Skip to content

Commit e55b65c

Browse files
committed
docs(README): remove outdated GitHub Pages setup info
feat(ui): enhance "About" section with detailed app overview, features, and tips test(e2e): ensure navigation flows tested in key generation, encryption, and signing specs fix(ui): add spacing between private and public keys in key generation output ci(cypress): run Cypress in headless Chrome refactor(toast): improve import success message clarity
1 parent 012d845 commit e55b65c

File tree

9 files changed

+98
-32
lines changed

9 files changed

+98
-32
lines changed

CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,6 @@ This project includes a GitHub Actions workflow for automatic deployment to GitH
8989
2. It automatically triggers on pushes to the `main` branch
9090
3. It can also be manually triggered through the GitHub Actions interface
9191

92-
To enable GitHub Pages deployment:
93-
94-
1. Go to your repository settings
95-
2. Navigate to "Pages" in the sidebar
96-
3. Under "Source", select "GitHub Actions"
97-
4. The site will automatically deploy on the next push to the main branch
98-
99-
The deployed site will be available at `https://<username>.github.io/<repository-name>/`
100-
10192
## Privacy
10293

10394
CommonKey is designed with privacy in mind:

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ document.addEventListener('DOMContentLoaded', () => {
353353
if (genPass.value) opts.passphrase = genPass.value;
354354
}
355355
const key = await openpgp.generateKey(opts);
356-
outputKeygen.textContent = key.publicKey + '\n' + key.privateKey;
356+
outputKeygen.textContent = key.publicKey + '\n\n' + key.privateKey;
357357
downloadPub.classList.remove('hidden');
358358
downloadPriv.classList.remove('hidden');
359359
downloadPub.onclick = () => downloadFile('public.asc', key.publicKey);

cypress/e2e/encryptDecrypt.spec.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ describe('Encryption & Decryption Flow', () => {
44
it('encrypts and then decrypts a message end-to-end', () => {
55
// Generate a key pair first
66
cy.visit('/');
7+
cy.get('#nav-keygen').click();
78
cy.get('#gen-name').type('E2E User');
89
cy.get('#gen-email').type('[email protected]');
910
cy.get('#form-keygen button[type="submit"]').click();
@@ -14,6 +15,7 @@ describe('Encryption & Decryption Flow', () => {
1415
const [publicKey, privateKey] = keyText.split('\n\n');
1516

1617
// Encrypt a message
18+
cy.get('#nav-encrypt').click();
1719
cy.get('#encrypt-message').type('Hello Cypress');
1820
cy.get('#encrypt-pubkey').type(publicKey);
1921
cy.get('#form-encrypt button[type="submit"]').click();
@@ -23,6 +25,7 @@ describe('Encryption & Decryption Flow', () => {
2325
.then((encrypted) => {
2426

2527
// Decrypt the message
28+
cy.get('#nav-decrypt').click();
2629
cy.get('#decrypt-message').clear().type(encrypted);
2730
cy.get('#decrypt-privkey').type(privateKey);
2831
cy.get('#form-decrypt button[type="submit"]').click();

cypress/e2e/importManage.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ describe('Import & Manage Keys Flow', () => {
44
it('imports a key, searches it, and deletes it', () => {
55
// Generate a key pair to import
66
cy.visit('/');
7+
cy.get('#nav-keygen').click();
78
cy.get('#gen-name').type('ImportUser');
89
cy.get('#gen-email').type('[email protected]');
910
cy.get('#form-keygen button[type="submit"]').click();
@@ -18,7 +19,7 @@ describe('Import & Manage Keys Flow', () => {
1819
// Import public key
1920
cy.get('#import-key').type(publicKey);
2021
cy.get('#form-import button[type="submit"]').click();
21-
cy.get('.toast').should('contain', 'Imported public key');
22+
cy.get('.toast').should('contain', 'import completed successfully');
2223

2324
// Search for the imported key
2425
cy.get('#key-search').type('public');

cypress/e2e/keygen.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
describe('Key Generation Flow', () => {
44
it('generates a key pair and verifies download buttons', () => {
55
cy.visit('/');
6+
cy.get('#nav-keygen').click();
67
cy.get('#gen-name').type('Test User');
78
cy.get('#gen-email').type('[email protected]');
89
cy.get('#form-keygen button[type="submit"]').click();

cypress/e2e/signVerify.spec.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
describe('Sign & Verify Flow', () => {
44
it('signs a message and then verifies the signature', () => {
55
cy.visit('/');
6+
cy.get('#nav-keygen').click();
67
// Generate a key pair
78
cy.get('#gen-name').type('Signer User');
89
cy.get('#gen-email').type('[email protected]');
@@ -14,6 +15,7 @@ describe('Sign & Verify Flow', () => {
1415
const [publicKey, privateKey] = keyText.split('\n\n');
1516

1617
// Sign a message
18+
cy.get('#nav-sign').click();
1719
cy.get('#sign-message').type('Message to Sign');
1820
cy.get('#sign-privkey').type(privateKey);
1921
cy.get('#form-sign button[type="submit"]').click();
@@ -23,6 +25,7 @@ describe('Sign & Verify Flow', () => {
2325
.then((signature) => {
2426

2527
// Verify the signature
28+
cy.get('#nav-verify').click();
2629
cy.get('#verify-message').clear().type('Message to Sign\n' + signature);
2730
cy.get('#verify-pubkey').type(publicKey);
2831
cy.get('#form-verify button[type="submit"]').click();

index.html

Lines changed: 87 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -423,27 +423,95 @@ <h2 class="card-title">Keybox</h2>
423423

424424
<!-- About -->
425425
<section id="about" class="card mb-6">
426-
<div class="card-header">
427-
<h2 class="card-title">About CommonKey</h2>
428-
<p class="card-description">A client-side PGP encryption tool built with OpenPGP.js</p>
426+
<div class="card-header">
427+
<h2 class="card-title">About CommonKey</h2>
428+
<p class="card-description">A private, client‑side PGP toolkit for generating keys, encrypting/decrypting messages, and signing/verifying data—right in your browser.</p>
429+
</div>
430+
<div class="card-content space-y-6">
431+
<div class="space-y-2">
432+
<h3 class="text-lg font-semibold">What is CommonKey?</h3>
433+
<p>
434+
CommonKey is a lightweight web app for everyday PGP tasks. It focuses on simplicity, privacy, and portability—no accounts, no servers, and no tracking.
435+
</p>
436+
</div>
437+
438+
<div class="space-y-2">
439+
<h3 class="text-lg font-semibold">How it works</h3>
440+
<ul class="list-disc pl-6 space-y-1">
441+
<li>All cryptographic operations happen locally in your browser.</li>
442+
<li>An entropy overlay collects randomness from mouse movement during initialization.</li>
443+
<li>Imported keys are stored only in your browser’s local storage (if you choose to save them).</li>
444+
<li>No data is transmitted to any server; passphrases are never stored.</li>
445+
</ul>
446+
</div>
447+
448+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
449+
<div class="space-y-2">
450+
<h3 class="text-lg font-semibold">Quick tips</h3>
451+
<ul class="list-disc pl-6 space-y-1">
452+
<li>Use the sidebar to switch between Key Gen, Encrypt, Decrypt, Sign, Verify, Revoke, and Keybox.</li>
453+
<li>Keyboard shortcuts:
454+
<span class="kbd">Ctrl+G</span> Key Gen,
455+
<span class="kbd">Ctrl+E</span> Encrypt,
456+
<span class="kbd">Ctrl+D</span> Decrypt,
457+
<span class="kbd">Ctrl+S</span> Sign,
458+
<span class="kbd">Ctrl+V</span> Verify.
459+
</li>
460+
<li>Drag and drop supported: drop files into highlighted areas to auto-fill text.</li>
461+
<li>Dark/Light mode toggle is available in the header.</li>
462+
</ul>
429463
</div>
430-
<div class="card-content">
431-
<p class="mb-4">CommonKey is a client-side PGP encryption tool built with OpenPGP.js. All operations happen in your browser for maximum privacy.</p>
432-
<div>
433-
<h3 class="font-semibold mb-2">Features:</h3>
434-
<ul class="list-disc list-inside space-y-1 text-sm text-muted-foreground">
435-
<li>Generate ECC or RSA keypairs</li>
436-
<li>Encrypt/decrypt messages</li>
437-
<li>Sign and verify messages</li>
438-
<li>Revoke keys</li>
439-
<li>Import and manage keys</li>
440-
</ul>
441-
</div>
442-
<div class="mt-4">
443-
<a href="https://github.com/Securenza/CommonKey/releases/latest/download/commonkey-release.zip" class="btn btn-primary" target="_blank" rel="noopener">Download Latest Release (ZIP)</a>
444-
</div>
464+
<div class="space-y-2">
465+
<h3 class="text-lg font-semibold">Security notes</h3>
466+
<ul class="list-disc pl-6 space-y-1">
467+
<li>Use strong passphrases for private keys whenever possible.</li>
468+
<li>Keep your private key and revocation certificate safe and backed up.</li>
469+
<li>Verify public keys (fingerprints) out of band before trusting them.</li>
470+
<li>Browser environment: extensions or compromised devices can affect security—use trusted environments.</li>
471+
</ul>
445472
</div>
446-
</section>
473+
</div>
474+
475+
<div class="space-y-2">
476+
<h3 class="text-lg font-semibold">Privacy</h3>
477+
<p>
478+
CommonKey does not send your data anywhere. There are no analytics, tracking, or cookies. Everything you do remains on your device.
479+
</p>
480+
</div>
481+
482+
<div class="space-y-2">
483+
<h3 class="text-lg font-semibold">Accessibility</h3>
484+
<ul class="list-disc pl-6 space-y-1">
485+
<li>Keyboard navigation: forms and main actions are reachable via standard tabbing.</li>
486+
<li>ARIA labels and live regions are used for toasts and interactive elements.</li>
487+
<li>Dark mode and high-contrast friendly design tokens are available.</li>
488+
</ul>
489+
</div>
490+
491+
<div class="space-y-2">
492+
<h3 class="text-lg font-semibold">Acknowledgements</h3>
493+
<ul class="list-disc pl-6 space-y-1">
494+
<li>OpenPGP.js for the cryptographic engine.</li>
495+
<li>Securenza for support and inspiration.</li>
496+
</ul>
497+
</div>
498+
499+
<div class="space-y-2">
500+
<h3 class="text-lg font-semibold">License & Contributions</h3>
501+
<p>
502+
CommonKey is open source under the MIT License. Contributions are welcome—bug reports, improvements, and documentation updates help everyone.
503+
</p>
504+
</div>
505+
</div>
506+
<div class="card-footer">
507+
<div class="flex flex-wrap items-center gap-2 text-sm text-muted-foreground">
508+
<span class="badge badge-outline">Client-side</span>
509+
<span class="badge badge-outline">No telemetry</span>
510+
<span class="badge badge-outline">Dark/Light</span>
511+
<span class="badge badge-outline">Offline-friendly</span>
512+
</div>
513+
</div>
514+
</section>
447515

448516
</main>
449517

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
88
"cypress:open": "cypress open",
9-
"cypress:run": "cypress run"
9+
"cypress:run": "cypress run --browser chrome --headless"
1010
},
1111
"repository": {
1212
"type": "git",

0 commit comments

Comments
 (0)