Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
d63d529d2b | |||
c4f545d1e8 | |||
b94588ead4 | |||
96657b89d2 | |||
d05b090252 | |||
d262a37db6 | |||
a66e8033df | |||
95ba8d1fed | |||
f93be44449 | |||
f73aa1bcf8 | |||
6e25bb697f | |||
5a105a7b29 | |||
c8dfeaec12 | |||
bf2c95bfb6 | |||
4aef5a1b04 | |||
7520b6b1da | |||
d84475ffe9 | |||
8e6ef5e2f6 | |||
8acf812066 | |||
64d5953f60 | |||
f447cbea2d | |||
0cd49a5c17 |
1
.gitattributes
vendored
@@ -1,2 +1 @@
|
|||||||
*.afdesign filter=lfs diff=lfs merge=lfs -text
|
*.afdesign filter=lfs diff=lfs merge=lfs -text
|
||||||
*.svg filter=lfs diff=lfs merge=lfs -text
|
|
||||||
|
12
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: cupcakearmy
|
||||||
|
patreon: # Replace with a single Patreon username
|
||||||
|
open_collective: # Replace with a single Open Collective username
|
||||||
|
ko_fi: # Replace with a single Ko-fi username
|
||||||
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
|
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
|
liberapay: # Replace with a single Liberapay username
|
||||||
|
issuehunt: # Replace with a single IssueHunt username
|
||||||
|
otechie: # Replace with a single Otechie username
|
||||||
|
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
9
.gitignore
vendored
@@ -1 +1,10 @@
|
|||||||
|
|
||||||
|
# Backend
|
||||||
/target
|
/target
|
||||||
|
|
||||||
|
# Client
|
||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
/.svelte
|
||||||
|
/build
|
||||||
|
/functions
|
||||||
|
33
CHANGELOG.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.0.3] - 2021-05-02
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Higher default text area
|
||||||
|
- Mobile touchups
|
||||||
|
|
||||||
|
## [1.0.2] - 2021-05-02
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- SVG Icons
|
||||||
|
|
||||||
|
## [1.0.1] - 2021-05-02
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Dark mode support
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Don't reload data on wrong password
|
||||||
|
|
||||||
|
## [1.0.0] - 2021-05-02
|
||||||
|
|
||||||
|
Initial release
|
29
README.md
@@ -1,16 +1,25 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="./design/github.svg">
|
<img src="./design/Github.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
## About?
|
## About?
|
||||||
|
|
||||||
_cryptgeon_ is an secure, open source sharing note service inspired by [_PrivNote_](https://privnote.com)
|
_cryptgeon_ is an secure, open source sharing note service inspired by [_PrivNote_](https://privnote.com)
|
||||||
|
|
||||||
|
## Demo
|
||||||
|
|
||||||
|
Check out the demo and see for yourself https://cryptgeon.nicco.io.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- view and time constrains
|
- view and time constrains
|
||||||
- in memory, no persistence
|
- in memory, no persistence
|
||||||
- in browser encryption → server cannot decrypt contents
|
- in browser encryption → server cannot decrypt contents
|
||||||
|
- obligatory dark mode support
|
||||||
|
|
||||||
## How does it work?
|
## How does it work?
|
||||||
|
|
||||||
@@ -18,11 +27,11 @@ each note has a 512bit generated <i>id</i> that is used to retrieve the note. da
|
|||||||
|
|
||||||
## Screenshot
|
## Screenshot
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
Docker is the easiest way.
|
Docker is the easiest way. There is the [official image here](https://hub.docker.com/r/cupcakearmy/cryptgeon).
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# docker-compose.yml
|
# docker-compose.yml
|
||||||
@@ -40,6 +49,20 @@ services:
|
|||||||
- 80:5000
|
- 80:5000
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
1. Clone
|
||||||
|
2. run `npm i` in the root and and client `client/` folders.
|
||||||
|
3. Run `npm run dev` to start development.
|
||||||
|
|
||||||
|
Running `npm run dev` in the root folder will start the following things
|
||||||
|
|
||||||
|
- a memcache docker container
|
||||||
|
- rust backend with hot reload
|
||||||
|
- client with hot reload
|
||||||
|
|
||||||
|
You can see the app under [localhost:3000](http://localhost:3000).
|
||||||
|
|
||||||
###### Attributions
|
###### Attributions
|
||||||
|
|
||||||
Icons made by <a href="https://www.freepik.com" title="Freepik">freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>
|
Icons made by <a href="https://www.freepik.com" title="Freepik">freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
font-family: 'Fira Mono', monospace;
|
font-family: 'Fira Mono', monospace;
|
||||||
|
|
||||||
--ui-bg-0: #fefefe;
|
--ui-bg-0: #fefefe;
|
||||||
--ui-bg-0-85: #ffffffd9;
|
--ui-bg-0-85: #fefefed9;
|
||||||
--ui-bg-1: #eee;
|
--ui-bg-1: #eee;
|
||||||
--ui-bg-2: #e2e2e2;
|
--ui-bg-2: #e2e2e2;
|
||||||
--ui-text-0: #111;
|
--ui-text-0: #111;
|
||||||
@@ -19,6 +19,17 @@
|
|||||||
--ui-anim: all 150ms ease;
|
--ui-anim: all 150ms ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--ui-bg-0: #111;
|
||||||
|
--ui-bg-0-85: #111111d9;
|
||||||
|
--ui-bg-1: #222;
|
||||||
|
--ui-bg-2: #282828;
|
||||||
|
--ui-text-0: #fefefe;
|
||||||
|
--ui-text-1: #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.error-text {
|
.error-text {
|
||||||
color: var(--ui-clr-error);
|
color: var(--ui-clr-error);
|
||||||
}
|
}
|
||||||
@@ -53,6 +64,13 @@ button {
|
|||||||
transition: var(--ui-anim);
|
transition: var(--ui-anim);
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
|
background: inherit;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
*:disabled,
|
||||||
|
*[disabled='true'] {
|
||||||
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset {
|
fieldset {
|
||||||
|
@@ -13,15 +13,20 @@
|
|||||||
<style>
|
<style>
|
||||||
textarea {
|
textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 8rem;
|
min-height: calc(100vh - 30rem);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
|
||||||
border: 2px solid var(--ui-bg-1);
|
border: 2px solid var(--ui-bg-1);
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
outline: none;
|
outline: none;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 30rem) {
|
||||||
|
textarea {
|
||||||
|
min-height: calc(100vh - 25rem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
textarea:hover,
|
textarea:hover,
|
||||||
textarea:focus {
|
textarea:focus {
|
||||||
border-color: var(--ui-clr-primary);
|
border-color: var(--ui-clr-primary);
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<small>
|
<small disabled={$$restProps.disabled}>
|
||||||
{label}
|
{label}
|
||||||
</small>
|
</small>
|
||||||
<input bind:value {...$$restProps} />
|
<input bind:value {...$$restProps} />
|
||||||
|
BIN
client/src/lib/views/Header/Logo.svg
(Stored with Git LFS)
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 3.8 KiB |
@@ -62,8 +62,19 @@
|
|||||||
|
|
||||||
header {
|
header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: calc(min(15vh, 6rem));
|
margin-top: 4rem;
|
||||||
margin-bottom: 4rem;
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 30rem) {
|
||||||
|
header {
|
||||||
|
margin-top: 1rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
header svg {
|
||||||
|
max-height: 4rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header svg {
|
header svg {
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
async function show() {
|
async function show() {
|
||||||
const data = await get(id)
|
const data = note || (await get(id)) // Don't get the content twice on wrong password.
|
||||||
if (needPassword) {
|
if (needPassword) {
|
||||||
try {
|
try {
|
||||||
const key = await getKeyFromString(password)
|
const key = await getKeyFromString(password)
|
||||||
@@ -74,7 +74,11 @@
|
|||||||
<Button type="submit">show note</Button>
|
<Button type="submit">show note</Button>
|
||||||
{#if error}
|
{#if error}
|
||||||
<br />
|
<br />
|
||||||
<p class="error-text">wrong password. could not decipher.</p>
|
<p class="error-text">
|
||||||
|
wrong password. could not decipher.
|
||||||
|
<br />
|
||||||
|
note already destroyed. try again without reloading the page.
|
||||||
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
</form>
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
|
BIN
client/static/icons/copy-sharp.svg
(Stored with Git LFS)
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 313 B |
BIN
client/static/icons/dice-sharp.svg
(Stored with Git LFS)
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 728 B |
BIN
client/static/icons/eye-off-sharp.svg
(Stored with Git LFS)
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 720 B |
BIN
client/static/icons/eye-sharp.svg
(Stored with Git LFS)
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 474 B |
BIN
client/static/icons/lock-closed-sharp.svg
(Stored with Git LFS)
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 275 B |
BIN
design/Github.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
design/Logo.svg
(Stored with Git LFS)
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 3.8 KiB |
BIN
design/Screens.afdesign
(Stored with Git LFS)
Normal file
BIN
design/Screens.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
design/dove.svg
(Stored with Git LFS)
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 3.3 KiB |
BIN
design/github.svg
(Stored with Git LFS)
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 60 KiB |
1375
package-lock.json
generated
Normal file
11
package.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"scripts": {
|
||||||
|
"dev:docker": "docker-compose up memcached",
|
||||||
|
"dev:backend": "cargo watch -x 'run --bin cryptgeon'",
|
||||||
|
"dev:front": "npm --prefix client run dev",
|
||||||
|
"dev": "run-p dev:*"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"npm-run-all": "^4.1.5"
|
||||||
|
}
|
||||||
|
}
|