Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
Required Notice: Copyright Jam-Sw (https://github.com/Jam-Sw)

Required Notice: Uses not permitted below need a commercial license from
Jam-Sw. Contact jam.sw.org@gmail.com.

# PolyForm Strict License 1.0.0

<https://polyformproject.org/licenses/strict/1.0.0>

## Acceptance

In order to get any license under these terms, you must agree
to them as both strict obligations and conditions to all
your licenses.

## Copyright License

The licensor grants you a copyright license for the software
to do everything you might do with the software that would
otherwise infringe the licensor's copyright in it for any
permitted purpose, other than distributing the software or
making changes or new works based on the software.

## Patent License

The licensor grants you a patent license for the software that
covers patent claims the licensor can license, or becomes able
to license, that you would infringe by using the software.

## Noncommercial Purposes

Any noncommercial purpose is a permitted purpose.

## Personal Uses

Personal use for research, experiment, and testing for
the benefit of public knowledge, personal study, private
entertainment, hobby projects, amateur pursuits, or religious
observance, without any anticipated commercial application,
is use for a permitted purpose.

## Noncommercial Organizations

Use by any charitable organization, educational institution,
public research organization, public safety or health
organization, environmental protection organization,
or government institution is use for a permitted purpose
regardless of the source of funding or obligations resulting
from the funding.

## Fair Use

You may have "fair use" rights for the software under the
law. These terms do not limit them.

## No Other Rights

These terms do not allow you to sublicense or transfer any of
your licenses to anyone else, or prevent the licensor from
granting licenses to anyone else. These terms do not imply
any other licenses.

## Patent Defense

If you make any written claim that the software infringes or
contributes to infringement of any patent, your patent license
for the software granted under these terms ends immediately. If
your company makes such a claim, your patent license ends
immediately for work on behalf of your company.

## Violations

The first time you are notified in writing that you have
violated any of these terms, or done anything with the software
not covered by your licenses, your licenses can nonetheless
continue if you come into full compliance with these terms,
and take practical steps to correct past violations, within
32 days of receiving notice. Otherwise, all your licenses
end immediately.

## No Liability

***As far as the law allows, the software comes as is, without
any warranty or condition, and the licensor will not be liable
to you for any damages arising out of these terms or the use
or nature of the software, under any kind of legal claim.***

## Definitions

The **licensor** is the individual or entity offering these
terms, and the **software** is the software the licensor makes
available under these terms.

**You** refers to the individual or entity agreeing to these
terms.

**Your company** is any legal entity, sole proprietorship,
or other kind of organization that you work for, plus all
organizations that have control over, are under the control of,
or are under common control with that organization. **Control**
means ownership of substantially all the assets of an entity,
or the power to direct its management and policies by vote,
contract, or otherwise. Control can be direct or indirect.

**Your licenses** are all the licenses granted to you for the
software under these terms.

**Use** means anything you do with the software requiring one
of your licenses.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,11 @@ This is a private project developed by the jam-sw team.
- All changes land via pull request into `main`
- Commit subjects stay short and concrete; bodies explain what changed in one or two sentences
- Core behavior is covered with Rust tests against SQLite, frontend utilities with Vitest, and components must pass `svelte-check`

## License

InstantNotes is source-available under the [PolyForm Strict License 1.0.0](LICENSE.md).
You can read the code and use the app for personal, noncommercial purposes. Using it for
a business or paid work, redistributing it, or publishing modified versions needs a
commercial license from Jam-Sw: write to jam.sw.org@gmail.com. Installing or using the
app means agreeing to the [end user license agreement](src-tauri/installer/EULA.txt).
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"tauri:dev": "node scripts/tauri-dev.mjs",
"bump": "node scripts/bump-version.mjs"
},
"license": "MIT",
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
"@codemirror/commands": "^6",
"@codemirror/lang-markdown": "^6.5.0",
Expand Down
1 change: 1 addition & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ members = ["core"]
resolver = "2"

[package]
license = "PolyForm-Strict-1.0.0"
name = "instantnotes"
version = "0.8.0"
description = "InstantNotes — instant capture, organized knowledge"
Expand Down
87 changes: 87 additions & 0 deletions src-tauri/installer/EULA.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
InstantNotes END USER LICENSE AGREEMENT
Jam-Sw. EULA version 2026-09-30.

Read this agreement before installing or using InstantNotes (the "Software").
By installing, copying, or using the Software you agree to these terms. If you
do not agree, do not install or use the Software.

1. WHO WE ARE
The Software is developed and distributed by Jam-Sw ("we", "us").
Contact: jam.sw.org@gmail.com

2. FREE LICENSE
We grant you a non-exclusive, non-transferable license to install and use
the Software on devices you own or control, at no charge, for these uses:
a. personal, noncommercial use; and
b. use by charities, schools, and public research or government bodies.
Use by or for a business, for paid work, or to make money is not free.

3. COMMERCIAL LICENSE
Any other use needs a commercial license. You get one by buying it from
Jam-Sw or by written agreement with us. A commercial license covers the
number of users or devices stated at purchase and is otherwise subject to
this agreement. If you have been using the Software without the license
your use needs, you have 30 days after we notify you to buy one or stop.

4. WHAT YOU MAY NOT DO
Unless a written agreement with Jam-Sw says otherwise, you may not:
a. sell, rent, lease, or sublicense the Software;
b. redistribute the Software, or a modified version, for commercial
purposes;
c. remove or alter any copyright, trademark, or Required Notice;
d. use the Jam-Sw name, logos, or the Software's name to endorse or
promote a product or service.

5. SOURCE CODE
The source code is published under the PolyForm Strict License 1.0.0:
https://polyformproject.org/licenses/strict/1.0.0
That license governs the source; this agreement governs the installed
Software. Nothing here narrows the rights that license grants you.

6. YOUR DATA
The Software stores your data on your device. We do not collect it. The
Software contacts our servers only to check for updates, and the only
information sent is what an update check needs (app version and platform).
Third-party components named in the Software's notices may send anonymous
usage counts to their makers; they never send your content.

7. OWNERSHIP
The Software is licensed, not sold. Jam-Sw keeps all rights, title, and
interest in it, including all intellectual property rights.

8. UPDATES
The Software may check for and install updates. Updates are covered by this
agreement unless they come with their own terms.

9. THIRD-PARTY COMPONENTS
The Software includes open source components under their own licenses.
Their notices ship with the Software, and those licenses govern those
components.

10. NO WARRANTY
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, AND NON-INFRINGEMENT. YOU USE IT AT YOUR OWN RISK.

11. LIMITATION OF LIABILITY
TO THE FULLEST EXTENT PERMITTED BY LAW, JAM-SW WILL NOT BE LIABLE FOR ANY
INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR ANY
LOSS OF DATA, PROFITS, OR BUSINESS, ARISING FROM THE SOFTWARE OR THIS
AGREEMENT. IF WE ARE LIABLE FOR ANYTHING, OUR TOTAL LIABILITY IS LIMITED
TO THE AMOUNT YOU PAID US FOR THE SOFTWARE IN THE 12 MONTHS BEFORE THE
CLAIM.

12. TERMINATION
This license ends automatically if you breach it. When it ends you must
stop using the Software and delete all copies. Sections 7, 10, 11, and 13
survive termination.

13. GENERAL
This agreement, plus any commercial license you buy, is the entire
agreement between you and Jam-Sw about the Software. If any part is
unenforceable, the rest stays in effect. Not enforcing a term is not a
waiver of it. This agreement is governed by the laws of the Province of Ontario, Canada,
without regard to conflict of law rules. Consumer protection laws that
apply to you still apply.

Copyright Jam-Sw. All rights reserved except as expressly granted above.
Binary file added src-tauri/installer/dmg-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src-tauri/installer/nsis-header.bmp
Binary file not shown.
Binary file added src-tauri/installer/nsis-sidebar.bmp
Binary file not shown.
Binary file added src-tauri/installer/nsis-uninstaller-header.bmp
Binary file not shown.
32 changes: 30 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
"csp": "default-src 'self'; img-src 'self' data: asset: http://asset.localhost; style-src 'self' 'unsafe-inline'; connect-src ipc: http://ipc.localhost",
"assetProtocol": {
"enable": true,
"scope": ["$APPDATA/attachments/**"]
"scope": [
"$APPDATA/attachments/**"
]
}
}
},
Expand All @@ -66,7 +68,33 @@
"createUpdaterArtifacts": true,
"macOS": {
"signingIdentity": "-",
"minimumSystemVersion": "11.0"
"minimumSystemVersion": "11.0",
"dmg": {
"background": "installer/dmg-background.png",
"windowSize": {
"width": 660,
"height": 400
},
"appPosition": {
"x": 180,
"y": 170
},
"applicationFolderPosition": {
"x": 480,
"y": 170
}
}
},
"licenseFile": "installer/EULA.txt",
"windows": {
"nsis": {
"installerIcon": "icons/icon.ico",
"uninstallerIcon": "icons/icon.ico",
"headerImage": "installer/nsis-header.bmp",
"uninstallerHeaderImage": "installer/nsis-uninstaller-header.bmp",
"sidebarImage": "installer/nsis-sidebar.bmp",
"installMode": "currentUser"
}
}
},
"plugins": {
Expand Down
110 changes: 110 additions & 0 deletions src/lib/EulaGate.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<script lang="ts">
// First-run EULA acceptance. Wrap the app's root layout content in this
// component. The DMG (macOS) and AppImage (Linux) have no installer license
// page, so this is where those users agree. Windows users see the same text
// in the NSIS installer and again here.
import { getCurrentWindow } from '@tauri-apps/api/window';
import eula from '../../src-tauri/installer/EULA.txt?raw';

let { children } = $props();

const KEY = 'jam-sw.eula.accepted';
const version = eula.match(/EULA version (\S+)\./)?.[1] ?? 'unknown';

function read(): string | null {
try {
return localStorage.getItem(KEY);
} catch {
return null;
}
}

let accepted = $state(read() === version);

function accept() {
try {
localStorage.setItem(KEY, version);
} catch {
// Storage unavailable: the gate shows again next launch, which is the safe side.
}
accepted = true;
}

function decline() {
getCurrentWindow().close();
}
</script>

{#if accepted}
{@render children?.()}
{:else}
<div class="eula-gate" role="dialog" aria-modal="true" aria-labelledby="eula-title">
<div class="eula-panel">
<h1 id="eula-title">License agreement</h1>
<p>Please read and accept the agreement to continue.</p>
<pre class="eula-text">{eula}</pre>
<div class="eula-actions">
<button type="button" onclick={decline}>Decline</button>
<button type="button" class="primary" onclick={accept}>I agree</button>
</div>
</div>
</div>
{/if}

<style>
.eula-gate {
position: fixed;
inset: 0;
display: grid;
place-items: center;
padding: 24px;
background: Canvas;
color: CanvasText;
z-index: 1000;
}
.eula-panel {
display: flex;
flex-direction: column;
gap: 12px;
width: min(720px, 100%);
max-height: 100%;
}
h1 {
margin: 0;
font-size: 1.25rem;
}
p {
margin: 0;
opacity: 0.8;
}
.eula-text {
flex: 1;
min-height: 0;
overflow: auto;
margin: 0;
padding: 16px;
border: 1px solid color-mix(in srgb, CanvasText 20%, transparent);
border-radius: 8px;
font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
white-space: pre-wrap;
}
.eula-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
}
button {
padding: 8px 16px;
border-radius: 6px;
border: 1px solid color-mix(in srgb, CanvasText 30%, transparent);
background: transparent;
color: inherit;
font: inherit;
cursor: pointer;
}
button.primary {
background: CanvasText;
color: Canvas;
border-color: CanvasText;
}
</style>
Loading
Loading