├── docker
├── mysql
│ └── .gitkeep
├── php-fpm
│ ├── php-ini-overrides.ini
│ ├── start-container
│ └── Dockerfile
└── nginx
│ └── nginx.conf
├── client
├── src
│ ├── index.css
│ ├── scss
│ │ ├── vendors
│ │ │ ├── .gitkeep
│ │ │ └── _variables.scss
│ │ ├── _ie-fix.scss
│ │ ├── style.scss
│ │ └── _variables.scss
│ ├── _nav.js
│ ├── containers
│ │ ├── NoteLayout
│ │ │ ├── index.js
│ │ │ ├── package.json
│ │ │ ├── NoteFooter.js
│ │ │ └── NoteCopyright.js
│ │ └── index.js
│ ├── views
│ │ ├── Help
│ │ │ └── package.json
│ │ ├── About
│ │ │ └── package.json
│ │ ├── Notes
│ │ │ ├── package.json
│ │ │ └── WelcomeMessage.js
│ │ ├── Users
│ │ │ └── package.json
│ │ ├── Pages
│ │ │ ├── Login
│ │ │ │ └── package.json
│ │ │ ├── Page404
│ │ │ │ ├── package.json
│ │ │ │ └── Page404.js
│ │ │ ├── Page500
│ │ │ │ ├── package.json
│ │ │ │ └── Page500.js
│ │ │ ├── RecoverPassword
│ │ │ │ └── package.json
│ │ │ └── index.js
│ │ ├── Profile
│ │ │ └── package.json
│ │ └── Settings
│ │ │ └── package.json
│ ├── assets
│ │ └── img
│ │ │ └── brand
│ │ │ ├── plainpad-logo.png
│ │ │ ├── alextselegidis-logo.png
│ │ │ ├── logo.svg
│ │ │ └── minimized-logo.svg
│ ├── App.scss
│ ├── http
│ │ ├── OfflineError.js
│ │ ├── SettingsHttpClient.js
│ │ ├── SessionsHttpClient.js
│ │ └── ApplicationHttpClient.js
│ ├── lang
│ │ ├── zh-CN
│ │ │ ├── application.js
│ │ │ ├── layout.js
│ │ │ ├── account.js
│ │ │ ├── index.js
│ │ │ ├── settings.js
│ │ │ ├── users.js
│ │ │ ├── notes.js
│ │ │ └── profile.js
│ │ ├── sv-SE
│ │ │ ├── application.js
│ │ │ ├── layout.js
│ │ │ ├── index.js
│ │ │ ├── account.js
│ │ │ ├── settings.js
│ │ │ ├── users.js
│ │ │ ├── notes.js
│ │ │ └── profile.js
│ │ ├── en-US
│ │ │ ├── application.js
│ │ │ ├── layout.js
│ │ │ ├── index.js
│ │ │ ├── account.js
│ │ │ ├── users.js
│ │ │ ├── settings.js
│ │ │ ├── notes.js
│ │ │ └── profile.js
│ │ ├── de-DE
│ │ │ ├── application.js
│ │ │ ├── layout.js
│ │ │ ├── index.js
│ │ │ ├── account.js
│ │ │ ├── settings.js
│ │ │ ├── users.js
│ │ │ ├── notes.js
│ │ │ └── profile.js
│ │ ├── fr-FR
│ │ │ ├── application.js
│ │ │ ├── layout.js
│ │ │ ├── index.js
│ │ │ ├── account.js
│ │ │ ├── users.js
│ │ │ ├── settings.js
│ │ │ ├── notes.js
│ │ │ └── profile.js
│ │ └── index.js
│ ├── routes.js
│ ├── stores
│ │ └── index.js
│ ├── index.js
│ ├── storage.js
│ ├── App.js
│ └── polyfill.js
├── public
│ ├── assets
│ │ ├── .gitkeep
│ │ └── img
│ │ │ ├── favicon.png
│ │ │ ├── icon-72x72.png
│ │ │ ├── icon-96x96.png
│ │ │ ├── icon-128x128.png
│ │ │ ├── icon-144x144.png
│ │ │ ├── icon-152x152.png
│ │ │ ├── icon-192x192.png
│ │ │ ├── icon-384x384.png
│ │ │ └── icon-512x512.png
│ ├── favicon.ico
│ ├── apple-touch-icon.png
│ └── manifest.json
├── .env
├── .editorconfig
├── .gitignore
├── ISSUE_TEMPLATE.md
├── REACT.md
├── LICENSE
└── package.json
├── .gitattributes
├── server
├── storage
│ ├── logs
│ │ └── .gitignore
│ ├── app
│ │ ├── public
│ │ │ └── .gitignore
│ │ └── .gitignore
│ ├── updates
│ │ └── .gitignore
│ └── framework
│ │ ├── views
│ │ └── .gitignore
│ │ ├── cache
│ │ ├── data
│ │ │ └── .gitignore
│ │ └── .gitignore
│ │ ├── sessions
│ │ └── .gitignore
│ │ ├── testing
│ │ └── .gitignore
│ │ └── .gitignore
├── bootstrap
│ ├── cache
│ │ └── .gitignore
│ └── app.php
├── public
│ ├── robots.txt
│ ├── logo.png
│ ├── favicon.ico
│ ├── .htaccess
│ ├── web.config
│ └── api.php
├── database
│ ├── .gitignore
│ ├── seeders
│ │ ├── DatabaseSeeder.php
│ │ └── UsersSeeder.php
│ ├── factories
│ │ └── UserFactory.php
│ └── migrations
│ │ ├── 2020_02_21_100738_create_sessions_table.php
│ │ ├── 2019_11_19_085128_create_settings_table.php
│ │ ├── 2019_11_19_081344_create_notes_table.php
│ │ └── 2019_11_19_081328_create_users_table.php
├── resources
│ ├── views
│ │ └── vendor
│ │ │ └── self-update
│ │ │ ├── self-update.blade.php
│ │ │ └── mails
│ │ │ └── update-available.blade.php
│ └── lang
│ │ ├── zh-CN
│ │ ├── auth.php
│ │ ├── pagination.php
│ │ ├── passwords.php
│ │ ├── validation.php
│ │ └── account.php
│ │ ├── de-DE
│ │ ├── pagination.php
│ │ ├── auth.php
│ │ ├── passwords.php
│ │ └── account.php
│ │ ├── en-US
│ │ ├── pagination.php
│ │ ├── auth.php
│ │ ├── passwords.php
│ │ └── account.php
│ │ └── sv-SE
│ │ ├── pagination.php
│ │ ├── auth.php
│ │ ├── passwords.php
│ │ └── account.php
├── .gitattributes
├── app
│ ├── Http
│ │ ├── Controllers
│ │ │ ├── Controller.php
│ │ │ └── V1
│ │ │ │ ├── SettingsController.php
│ │ │ │ └── SessionsController.php
│ │ ├── Middleware
│ │ │ ├── EncryptCookies.php
│ │ │ ├── VerifyCsrfToken.php
│ │ │ ├── CheckForMaintenanceMode.php
│ │ │ ├── PreventRequestsDuringMaintenance.php
│ │ │ ├── TrimStrings.php
│ │ │ ├── TrustHosts.php
│ │ │ ├── Authenticate.php
│ │ │ ├── TrustProxies.php
│ │ │ ├── RedirectIfAuthenticated.php
│ │ │ └── Admin.php
│ │ └── Kernel.php
│ ├── Exceptions
│ │ ├── AutoUpdate
│ │ │ ├── ParserException.php
│ │ │ └── DownloadException.php
│ │ └── Handler.php
│ ├── Providers
│ │ ├── BroadcastServiceProvider.php
│ │ ├── AppServiceProvider.php
│ │ ├── EventServiceProvider.php
│ │ ├── AutoUpdateServiceProvider.php
│ │ ├── RouteServiceProvider.php
│ │ ├── AuthServiceProvider.php
│ │ └── MailConfigServiceProvider.php
│ ├── Console
│ │ ├── Kernel.php
│ │ └── Commands
│ │ │ ├── RefreshCommand.php
│ │ │ └── CleanupCommand.php
│ ├── Models
│ │ ├── Setting.php
│ │ ├── Session.php
│ │ └── User.php
│ └── Mail
│ │ └── PasswordRecovered.php
├── .gitignore
├── tests
│ ├── TestCase.php
│ ├── Unit
│ │ └── ExampleTest.php
│ ├── Feature
│ │ └── ExampleTest.php
│ └── CreatesApplication.php
├── .styleci.yml
├── .editorconfig
├── routes
│ ├── web.php
│ ├── channels.php
│ └── console.php
├── server.php
├── config
│ ├── cors.php
│ ├── services.php
│ ├── view.php
│ ├── hashing.php
│ └── broadcasting.php
├── phpunit.xml
├── artisan
├── composer.json
└── .env.example
├── logo.png
├── screenshot.png
├── .gitignore
├── .github
├── SECURITY.md
└── CONTRIBUTING.md
├── docs
├── readme.md
├── introduction.md
├── contributions.md
└── installation.md
├── CHANGELOG.md
├── .run
├── Stop.run.xml
├── SSH.run.xml
├── Build.run.xml
└── Start.run.xml
└── docker-compose.yml
/docker/mysql/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/index.css:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
--------------------------------------------------------------------------------
/client/public/assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/scss/vendors/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/server/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/server/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/server/storage/app/public/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/server/storage/updates/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/client/src/_nav.js:
--------------------------------------------------------------------------------
1 | export default {
2 | items: [],
3 | };
4 |
--------------------------------------------------------------------------------
/server/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 | *.sqlite-journal
3 |
--------------------------------------------------------------------------------
/server/resources/views/vendor/self-update/self-update.blade.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/server/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !public/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/server/storage/framework/cache/data/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/server/storage/framework/sessions/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/server/storage/framework/testing/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/logo.png
--------------------------------------------------------------------------------
/server/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !data/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/screenshot.png
--------------------------------------------------------------------------------
/server/public/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/server/public/logo.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.idea/
2 | /build/
3 | /docker/**
4 | !/docker/nginx/
5 | !/docker/php-fpm/
6 | .DS_Store
7 | *.zip
--------------------------------------------------------------------------------
/client/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/client/public/favicon.ico
--------------------------------------------------------------------------------
/server/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/server/public/favicon.ico
--------------------------------------------------------------------------------
/client/.env:
--------------------------------------------------------------------------------
1 | PORT=3000
2 | CHOKIDAR_USEPOLLING=true
3 | REACT_APP_BASE_URL=api.php
4 | REACT_APP_VERSION=1.1.0-alpha.1
5 |
--------------------------------------------------------------------------------
/client/src/containers/NoteLayout/index.js:
--------------------------------------------------------------------------------
1 | import NoteLayout from './NoteLayout';
2 |
3 | export default NoteLayout;
4 |
--------------------------------------------------------------------------------
/client/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/client/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/client/public/assets/img/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/client/public/assets/img/favicon.png
--------------------------------------------------------------------------------
/server/resources/lang/zh-CN/auth.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/server/resources/lang/zh-CN/auth.php
--------------------------------------------------------------------------------
/client/public/assets/img/icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/client/public/assets/img/icon-72x72.png
--------------------------------------------------------------------------------
/client/public/assets/img/icon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/client/public/assets/img/icon-96x96.png
--------------------------------------------------------------------------------
/client/public/assets/img/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/client/public/assets/img/icon-128x128.png
--------------------------------------------------------------------------------
/client/public/assets/img/icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/client/public/assets/img/icon-144x144.png
--------------------------------------------------------------------------------
/client/public/assets/img/icon-152x152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/client/public/assets/img/icon-152x152.png
--------------------------------------------------------------------------------
/client/public/assets/img/icon-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/client/public/assets/img/icon-192x192.png
--------------------------------------------------------------------------------
/client/public/assets/img/icon-384x384.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/client/public/assets/img/icon-384x384.png
--------------------------------------------------------------------------------
/client/public/assets/img/icon-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/client/public/assets/img/icon-512x512.png
--------------------------------------------------------------------------------
/client/src/views/Help/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Help",
3 | "version": "0.0.0",
4 | "private": true,
5 | "main": "./Help.js"
6 | }
7 |
--------------------------------------------------------------------------------
/server/resources/lang/zh-CN/pagination.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/server/resources/lang/zh-CN/pagination.php
--------------------------------------------------------------------------------
/server/resources/lang/zh-CN/passwords.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/server/resources/lang/zh-CN/passwords.php
--------------------------------------------------------------------------------
/server/resources/lang/zh-CN/validation.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/server/resources/lang/zh-CN/validation.php
--------------------------------------------------------------------------------
/client/src/views/About/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "About",
3 | "version": "0.0.0",
4 | "private": true,
5 | "main": "./About.js"
6 | }
7 |
--------------------------------------------------------------------------------
/client/src/views/Notes/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Notes",
3 | "version": "0.0.0",
4 | "private": true,
5 | "main": "./Notes.js"
6 | }
7 |
--------------------------------------------------------------------------------
/client/src/views/Users/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Users",
3 | "version": "0.0.0",
4 | "private": true,
5 | "main": "./Users.js"
6 | }
7 |
--------------------------------------------------------------------------------
/client/src/assets/img/brand/plainpad-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alextselegidis/plainpad/HEAD/client/src/assets/img/brand/plainpad-logo.png
--------------------------------------------------------------------------------
/client/src/views/Pages/Login/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Login",
3 | "version": "0.0.0",
4 | "private": true,
5 | "main": "./Login.js"
6 | }
7 |
--------------------------------------------------------------------------------
/client/src/views/Profile/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Profile",
3 | "version": "0.0.0",
4 | "private": true,
5 | "main": "./Profile.js"
6 | }
7 |
--------------------------------------------------------------------------------
/server/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/server/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | assertTrue(true);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/client/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .idea
15 | .env.local
16 | .env.development.local
17 | .env.test.local
18 | .env.production.local
19 |
20 | npm-debug.log*
21 | yarn-debug.log*
22 | yarn-error.log*
23 |
--------------------------------------------------------------------------------
/server/app/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $except = [
15 | //
16 | ];
17 | }
18 |
--------------------------------------------------------------------------------
/client/src/scss/style.scss:
--------------------------------------------------------------------------------
1 | // If you want to override variables do it here
2 | @import "variables";
3 |
4 | // Import styles
5 | @import "~@coreui/coreui/scss/coreui.scss";
6 |
7 | // Temp fix for reactstrap
8 | @import '~@coreui/coreui/scss/_dropdown-menu-right.scss';
9 |
10 | // If you want to add something do it here
11 | @import "custom";
12 |
13 | // Dark Theme
14 | @import "dark";
15 |
16 | // ie fixes
17 | @import "ie-fix";
18 |
--------------------------------------------------------------------------------
/server/app/Http/Middleware/VerifyCsrfToken.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $except = [
15 | //
16 | ];
17 | }
18 |
--------------------------------------------------------------------------------
/server/database/seeders/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call(UsersSeeder::class);
17 | $this->call(SettingsSeeder::class);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/server/app/Http/Middleware/CheckForMaintenanceMode.php:
--------------------------------------------------------------------------------
1 | get('/');
18 |
19 | $response->assertStatus(200);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/server/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $except = [
15 | //
16 | ];
17 | }
18 |
--------------------------------------------------------------------------------
/server/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $except = [
15 | 'current_password',
16 | 'password',
17 | 'password_confirmation',
18 | ];
19 | }
20 |
--------------------------------------------------------------------------------
/server/app/Http/Middleware/TrustHosts.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | public function hosts(): array
15 | {
16 | return [
17 | $this->allSubdomainsOfApplicationUrl(),
18 | ];
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/server/app/Providers/AppServiceProvider.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class)->bootstrap();
19 |
20 | return $app;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/client/src/App.scss:
--------------------------------------------------------------------------------
1 | // Styles
2 | // CoreUI Icons Set
3 | @import '~@coreui/icons/css/coreui-icons.css';
4 | // Import Flag Icons Set
5 | @import '~flag-icon-css/css/flag-icon.min.css';
6 | // Import Font Awesome Icons Set
7 | @import '~font-awesome/css/font-awesome.min.css';
8 | // Import Simple Line Icons Set
9 | @import '~simple-line-icons/css/simple-line-icons.css';
10 | // Import Toastr
11 | @import '~toastr/build/toastr.css';
12 | // Import Spin.js
13 | @import '~spin.js/spin.css';
14 | // Import Main styles for this application
15 | @import './scss/style.scss';
16 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Release Notes
2 |
3 | ## [Unreleased]
4 |
5 | ### Added
6 |
7 | - Add support for PHP 8.2+ / upgrade to Laravel 12 (#64)
8 | - Make sure that the tab title has the note title (#105)
9 | - Add tab key press support (insert 4 spaces) (#63)
10 | - Add character count to note editor (-)
11 | - Add right click custom context menu for the note editor (#53)
12 |
13 |
14 | ## [1.0.0] - 2024-12-13
15 |
16 | This is the first release including the initial set of features for the app. Multiple
17 | user support, note-taking, application settings, authorization and authentication.
18 |
19 |
--------------------------------------------------------------------------------
/server/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | authenticate($request, $guards);
15 | } catch(AuthenticationException $e) {
16 | return response('Unauthorized.', 401);
17 | }
18 |
19 | return $next($request);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/server/resources/lang/de-DE/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
17 | 'next' => 'Next »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/server/resources/lang/en-US/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
17 | 'next' => 'Next »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/server/resources/lang/sv-SE/pagination.php:
--------------------------------------------------------------------------------
1 | '« Föregående',
17 | 'next' => 'Nästa »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/server/routes/channels.php:
--------------------------------------------------------------------------------
1 | id === (int) $id;
18 | });
19 |
--------------------------------------------------------------------------------
/server/server.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | $uri = urldecode(
11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
12 | );
13 |
14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the
15 | // built-in PHP web server. This provides a convenient way to test a Laravel
16 | // application without having installed a "real" web server software here.
17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
18 | return false;
19 | }
20 |
21 | require_once __DIR__.'/public/index.php';
22 |
--------------------------------------------------------------------------------
/server/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $dontFlash = [
15 | 'current_password',
16 | 'password',
17 | 'password_confirmation',
18 | ];
19 |
20 | /**
21 | * Register the exception handling callbacks for the application.
22 | */
23 | public function register(): void
24 | {
25 | //
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/server/routes/console.php:
--------------------------------------------------------------------------------
1 | comment(Inspiring::quote());
19 | })->purpose('Display an inspiring quote');
20 |
--------------------------------------------------------------------------------
/server/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews -Indexes
4 |
5 |
6 | RewriteEngine On
7 |
8 | # Handle Authorization Header
9 | RewriteCond %{HTTP:Authorization} .
10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
11 |
12 | # Redirect Trailing Slashes If Not A Folder...
13 | RewriteCond %{REQUEST_FILENAME} !-d
14 | RewriteCond %{REQUEST_URI} (.+)/$
15 | RewriteRule ^ %1 [L,R=301]
16 |
17 | # Send Requests To Front Controller...
18 | RewriteCond %{REQUEST_FILENAME} !-d
19 | RewriteCond %{REQUEST_FILENAME} !-f
20 | RewriteRule ^ api.php [L]
21 |
22 |
--------------------------------------------------------------------------------
/server/resources/lang/de-DE/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/server/resources/lang/en-US/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/server/resources/lang/sv-SE/auth.php:
--------------------------------------------------------------------------------
1 | 'Vi kan inte hitta något konto som matchar de uppgifter du använt.',
17 | 'throttle' => 'För många inloggningsförsök, vänligen försök igen om :seconds sekunder.',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/server/app/Http/Middleware/TrustProxies.php:
--------------------------------------------------------------------------------
1 | |string|null
14 | */
15 | protected $proxies;
16 |
17 | /**
18 | * The headers that should be used to detect proxies.
19 | *
20 | * @var int
21 | */
22 | protected $headers =
23 | Request::HEADER_X_FORWARDED_FOR |
24 | Request::HEADER_X_FORWARDED_HOST |
25 | Request::HEADER_X_FORWARDED_PORT |
26 | Request::HEADER_X_FORWARDED_PROTO |
27 | Request::HEADER_X_FORWARDED_AWS_ELB;
28 | }
29 |
--------------------------------------------------------------------------------
/server/app/Providers/EventServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
19 | SendEmailVerificationNotification::class,
20 | ],
21 | ];
22 |
23 | /**
24 | * Register any events for your application.
25 | */
26 | public function boot(): void
27 | {
28 | //
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/server/resources/lang/de-DE/passwords.php:
--------------------------------------------------------------------------------
1 | 'Your password has been reset!',
17 | 'sent' => 'We have emailed your password reset link!',
18 | 'throttled' => 'Please wait before retrying.',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that email address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/server/resources/lang/en-US/passwords.php:
--------------------------------------------------------------------------------
1 | 'Your password has been reset!',
17 | 'sent' => 'We have emailed your password reset link!',
18 | 'throttled' => 'Please wait before retrying.',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that email address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/.run/Stop.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/client/src/assets/img/brand/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/resources/lang/sv-SE/passwords.php:
--------------------------------------------------------------------------------
1 | 'Ditt lösenord har återställts!',
17 | 'sent' => 'Vi har skickat en länk för att återställa ditt lösenord!',
18 | 'throttled' => 'Vänligen vänta innan du försöker igen.',
19 | 'token' => 'Återställningslänken är inte giltig.',
20 | 'user' => "Vi kan inte hitta en användare med den e-postadressen.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/client/src/assets/img/brand/minimized-logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/http/OfflineError.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | class OfflineError extends Error {}
21 |
22 | export default OfflineError;
23 |
--------------------------------------------------------------------------------
/client/src/lang/zh-CN/application.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | updateSuccess: '更新成功',
22 | updateFailure: '更新失败'
23 | }
24 |
--------------------------------------------------------------------------------
/server/app/Http/Middleware/RedirectIfAuthenticated.php:
--------------------------------------------------------------------------------
1 | check()) {
24 | return redirect(RouteServiceProvider::HOME);
25 | }
26 | }
27 |
28 | return $next($request);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/server/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 | $this->faker->name,
27 | 'email' => $this->faker->unique()->safeEmail,
28 | 'email_verified_at' => now(),
29 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
30 | 'remember_token' => Str::random(10),
31 | ];
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/server/database/migrations/2020_02_21_100738_create_sessions_table.php:
--------------------------------------------------------------------------------
1 | string('id')->primary();
18 | $table->string('user_id');
19 | $table->timestamps();
20 | $table->timestamp('expires_at')->useCurrent();
21 | $table->string('token');
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::dropIfExists('sessions');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/server/config/cors.php:
--------------------------------------------------------------------------------
1 | ['*'],
19 |
20 | 'allowed_methods' => ['*'],
21 |
22 | 'allowed_origins' => ['*'],
23 |
24 | 'allowed_origins_patterns' => [],
25 |
26 | 'allowed_headers' => ['*'],
27 |
28 | 'exposed_headers' => [],
29 |
30 | 'max_age' => 0,
31 |
32 | 'supports_credentials' => false,
33 |
34 | ];
35 |
--------------------------------------------------------------------------------
/client/src/lang/sv-SE/application.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | updateSuccess: 'Uppdateringarna har installerats.',
22 | updateFailure: 'Uppdateringarna kunde inte installeras.'
23 | }
24 |
--------------------------------------------------------------------------------
/client/src/lang/en-US/application.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | updateSuccess: 'The updates were installed successfully.',
22 | updateFailure: 'The updates could not be installed.'
23 | }
24 |
--------------------------------------------------------------------------------
/client/src/lang/de-DE/application.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | updateSuccess: 'Die Updates wurden erfolgreich installiert.',
22 | updateFailure: 'Die Updates konnten nicht installiert werden.'
23 | }
24 |
--------------------------------------------------------------------------------
/client/src/lang/fr-FR/application.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | updateSuccess: 'Les mises à jour ont été installées avec succès.',
22 | updateFailure: 'Les mises à jour n\'ont pas pu être installées.'
23 | }
24 |
--------------------------------------------------------------------------------
/server/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')->hourly();
28 | }
29 |
30 | /**
31 | * Register the commands for the application.
32 | *
33 | * @return void
34 | */
35 | protected function commands()
36 | {
37 | $this->load(__DIR__.'/Commands');
38 |
39 | require base_path('routes/console.php');
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other
4 | method with the owner of this repository before making a change.
5 |
6 | Please note we have a code of conduct, please follow it in all your interactions with the project.
7 |
8 | ## Pull Request Process
9 |
10 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
11 | 2. Ensure that your changes comply with the project's coding guidelines and that it's sufficiently documented.
12 | 3. Update the README.md with details of changes to the interface, this includes new environment variables, exposed
13 | ports, useful file locations and container parameters.
14 | 4. Target the develop branch for your Pull Requests as this is were new changes are introduced.
15 | 4. After being successfully reviewed pull requests will be merged to develop branch and will finally be included in an
16 | upcoming release.
17 |
18 |
--------------------------------------------------------------------------------
/client/src/lang/zh-CN/layout.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | users: '用户',
22 | settings: '设置',
23 | profile: '个人信息',
24 | about: '关于',
25 | help: '帮助',
26 | logout: '登出',
27 | pageNotAvailableOffline: '您已离线,无法对此页面进行操作'
28 | }
29 |
--------------------------------------------------------------------------------
/client/src/routes.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const Notes = React.lazy(() => import('./views/Notes'));
4 | const Settings = React.lazy(() => import('./views/Settings'));
5 | const Profile = React.lazy(() => import('./views/Profile'));
6 | const About = React.lazy(() => import('./views/About'));
7 | const Help = React.lazy(() => import('./views/Help'));
8 | const Users = React.lazy(() => import('./views/Users/Users'));
9 |
10 | // https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config
11 | const routes = [
12 | { path: '/settings', name: 'Settings', component: Settings },
13 | { path: '/profile', name: 'Profile', component: Profile },
14 | { path: '/about', name: 'About', component: About },
15 | { path: '/help', name: 'Help', component: Help },
16 | { path: '/notes', exact: true, name: 'Notes', component: Notes },
17 | { path: '/notes/:id', exact: true, name: 'Notes', component: Notes },
18 | { path: '/users', exact: true, name: 'Users', component: Users },
19 | ];
20 |
21 | export default routes;
22 |
--------------------------------------------------------------------------------
/client/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | Before opening an issue:
2 |
3 | - [Search for duplicate or closed issues](https://github.com/coreui/coreui-free-react-admin-template/issues?utf8=%E2%9C%93&q=is%3Aissue)
4 | - Prepare a [reduced test case](https://css-tricks.com/reduced-test-cases/) for any bugs
5 | - Read the [contributing guidelines](https://github.com/coreui/coreui-free-react-admin-template/blob/master/CONTRIBUTING.md)
6 |
7 | When asking general "how to" questions:
8 |
9 | - Please do not open an issue here
10 |
11 | When reporting a bug, include:
12 |
13 | - Operating system and version (Windows, Mac OS X, Android, iOS, Win10 Mobile)
14 | - Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
15 | - Reduced test cases and potential fixes using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/)
16 |
17 | When suggesting a feature, include:
18 |
19 | - As much detail as possible for what we should add and why it's important to CoreUI Admin Template
20 | - Relevant links to prior art, screenshots, or live demos whenever possible
21 |
--------------------------------------------------------------------------------
/client/src/lang/en-US/layout.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | users: 'Users',
22 | settings: 'Settings',
23 | profile: 'Profile',
24 | about: 'About',
25 | help: 'Help',
26 | logout: 'Logout',
27 | pageNotAvailableOffline: 'This page is not available when you are offline.'
28 | }
29 |
--------------------------------------------------------------------------------
/client/src/lang/sv-SE/layout.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | users: 'Användare',
22 | settings: 'Inställningar',
23 | profile: 'Profil',
24 | about: 'Om',
25 | help: 'Hjälp',
26 | logout: 'Logga ut',
27 | pageNotAvailableOffline: 'Denna sida är inte tillgänglig när du är offline.'
28 | }
29 |
--------------------------------------------------------------------------------
/server/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
21 | ],
22 |
23 | 'postmark' => [
24 | 'token' => env('POSTMARK_TOKEN'),
25 | ],
26 |
27 | 'ses' => [
28 | 'key' => env('AWS_ACCESS_KEY_ID'),
29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
31 | ],
32 |
33 | ];
34 |
--------------------------------------------------------------------------------
/client/src/lang/de-DE/layout.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | users: 'Benutzer',
22 | settings: 'Einstellungen',
23 | profile: 'Profil',
24 | about: 'Über',
25 | help: 'Hilfe',
26 | logout: 'Abmeldung',
27 | pageNotAvailableOffline: 'Diese Seite ist nicht verfügbar, wenn Sie offline sind.'
28 | }
29 |
--------------------------------------------------------------------------------
/client/src/lang/fr-FR/layout.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | users: 'Utilisateurs',
22 | settings: 'Réglages',
23 | profile: 'Profil',
24 | about: 'À propos',
25 | help: 'Aide',
26 | logout: 'Se déconnecter',
27 | pageNotAvailableOffline: 'Cette page n\'est pas disponible lorsque vous êtes hors ligne.'
28 | }
29 |
--------------------------------------------------------------------------------
/server/app/Providers/AutoUpdateServiceProvider.php:
--------------------------------------------------------------------------------
1 | app->singleton(AutoUpdateService::class, function ($app) {
17 | $autoUpdateService = new AutoUpdateService(base_path('storage/updates/'), base_path(), 60);
18 | $autoUpdateService->setCurrentVersion(config('app.version'));
19 | $autoUpdateService->setUpdateUrl(env('APP_REPOSITORY'));
20 | $autoUpdateService->setSslVerifyHost(false);
21 | $autoUpdateService->addLogHandler(new StreamHandler(base_path('storage/logs/update-' . date('Y-m-d') . '.log')));
22 | return $autoUpdateService;
23 | });
24 | }
25 |
26 | /**
27 | * Bootstrap services.
28 | */
29 | public function boot(): void
30 | {
31 | //
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/client/REACT.md:
--------------------------------------------------------------------------------
1 | # CoreUI React version
2 |
3 | ## Intro
4 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app)
5 |
6 | It uses Sass (with .scss). The styles are loaded at the template level with `node-sass-chokidar` css preprocessor
7 |
8 | Dependencies are handled by **npm**.
9 |
10 | ## Directories
11 | ```
12 | CoreUI-React#v2.0.0
13 | ├── public/ (static files)
14 | │ ├── assets/ (assets)
15 | │ ├── favicon.ico
16 | │ └── index.html (html temlpate)
17 | │
18 | ├── src/ (project root)
19 | │ ├── containers/ (container source)
20 | │ ├── scss/ (scss/css source)
21 | │ ├── views/ (views source)
22 | │ ├── App.js
23 | │ ├── App.test.js
24 | │ ├── index.js
25 | │ ├── _nav.js (sidebar config)
26 | │ └── routes.js (routes config)
27 | │
28 | └── package.json
29 | ```
30 |
31 | ## Usage
32 | `npm i` - to install dependencies
33 |
34 | ## Sctipts
35 | `npm start` for developing (it runs webpack-dev-server)
36 | `npm run build` to run a dev build
37 |
38 | ## See also
39 | [Create-React-App](CRA.md)
40 | [Changelog](./CHANGELOG.md)
41 | [Readme](./README.md)
42 |
--------------------------------------------------------------------------------
/server/app/Console/Commands/RefreshCommand.php:
--------------------------------------------------------------------------------
1 | true
44 | ]);
45 | Artisan::call('cleanup');
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/client/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2018 creativeLabs Łukasz Holeczek.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | services:
2 | php-fpm:
3 | build: docker/php-fpm
4 | working_dir: /var/www/html
5 | extra_hosts:
6 | - host.docker.internal:host-gateway
7 | volumes:
8 | - '.:/var/www/html'
9 | - './docker/php-fpm/php-ini-overrides.ini:/usr/local/etc/php/conf.d/99-overrides.ini'
10 | ports:
11 | - '3000:3000'
12 |
13 | nginx:
14 | image: 'nginx:1.23.3-alpine'
15 | working_dir: /var/www/html
16 | volumes:
17 | - '.:/var/www/html'
18 | - './docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf'
19 | ports:
20 | - '80:80'
21 |
22 | mysql:
23 | image: 'mysql:8.0'
24 | volumes:
25 | - './docker/mysql:/var/lib/mysql'
26 | environment:
27 | - MYSQL_ROOT_PASSWORD=secret
28 | - MYSQL_DATABASE=plainpad
29 | - MYSQL_USER=user
30 | - MYSQL_PASSWORD=password
31 | ports:
32 | - '3306:3306'
33 |
34 | phpmyadmin:
35 | image: 'phpmyadmin:5.2.1'
36 | ports:
37 | - '8080:80'
38 | environment:
39 | - 'PMA_HOST=mysql'
40 |
41 | mailpit:
42 | image: 'axllent/mailpit:v1.7'
43 | ports:
44 | - '8025:8025'
45 | - '1025:1025'
46 |
--------------------------------------------------------------------------------
/client/src/stores/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | import application from './application';
21 | import account from './account';
22 | import notes from './notes';
23 | import profile from './profile';
24 | import users from './users';
25 | import settings from './settings';
26 |
27 | export default {
28 | application,
29 | account,
30 | notes,
31 | users,
32 | settings,
33 | profile
34 | };
35 |
--------------------------------------------------------------------------------
/docs/introduction.md:
--------------------------------------------------------------------------------
1 | ## Introduction
2 |
3 | Plainpad is a self-hosted, open source note taking application that is very easy to set up on your server. Your data
4 | will never leave your server, and you will be able to access them from any device connected to the internet.
5 |
6 | With Plainpad you can allow multiple users to access the application without being able to see each other's notes. The
7 | notes are being encrypted and stored safely in the database.
8 |
9 | Made with simplicity in mind Plainpad feels directly familiar, with the right actions placed in the right positions you
10 | will only have to concentrate on the content.
11 |
12 | All the contents and notes are being encrypted before being stored so that the maximum security is guaranteed. Only the
13 | note owners are able to access the notes in a readable form.
14 |
15 | The installation is pretty simple and only requires a web server with PHP and MySQL configured. You can start using the
16 | app right after filling a simple form.
17 |
18 | Being an PWA application, Plainpad will give you access to your notes even when are offline. Changes will be synced once
19 | you get back online.
20 |
21 | [Back](readme.md)
22 |
--------------------------------------------------------------------------------
/server/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | configureRateLimiting();
27 | }
28 |
29 | /**
30 | * Configure the rate limiters for the application.
31 | */
32 | protected function configureRateLimiting(): void
33 | {
34 | RateLimiter::for('api', function (Request $request) {
35 | return Limit::perMinute(200)->by($request->user()?->id ?: $request->ip());
36 | });
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/.run/SSH.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/client/src/lang/zh-CN/account.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | successfullyLoggedIn: '登录成功',
22 | failedToLogIn: '账号或密码错误,请重试',
23 | successfullyLoggedOut: '您已成功登出账号',
24 | failedToLogOut: '登出失败,请重试',
25 | successfullyRecoveredPassword: '您的密码已成功恢复!请检查您的电子邮件获得更多内容',
26 | failedToRecoverPassword: '恢复密码时出现错误,请重试',
27 | invalidateSuccess: '成功清除缓存',
28 | sessionExpired: '您的会话已过期,请重新登录',
29 | }
30 |
--------------------------------------------------------------------------------
/server/resources/lang/zh-CN/account.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | return [
23 | 'registration' => 'ע��',
24 | 'registrationMessage' => '��л���� :url �ϴ����ʻ�����ʹ������ƾ�ݵ�¼��',
25 | 'resetPassword' => '������������',
26 | 'resetPasswordMessage' => 'ʹ�����������¼�����ʻ����뾡���¼������������롣',
27 | 'resetPasswordPreheader' => '���ʼ��������������롣��ʹ������¼��Ϊ�����ʻ�����һ�������롣',
28 | ];
29 |
--------------------------------------------------------------------------------
/server/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => env(
32 | 'VIEW_COMPILED_PATH',
33 | realpath(storage_path('framework/views'))
34 | ),
35 |
36 | ];
37 |
--------------------------------------------------------------------------------
/.run/Build.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.run/Start.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/client/src/lang/de-DE/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | import account from './account';
21 | import application from './application';
22 | import notes from './notes';
23 | import users from './users';
24 | import settings from './settings';
25 | import profile from './profile';
26 | import layout from './layout';
27 |
28 | export default {
29 | account,
30 | application,
31 | notes,
32 | users,
33 | settings,
34 | profile,
35 | layout,
36 | }
37 |
--------------------------------------------------------------------------------
/client/src/lang/en-US/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | import account from './account';
21 | import application from './application';
22 | import notes from './notes';
23 | import users from './users';
24 | import settings from './settings';
25 | import profile from './profile';
26 | import layout from './layout';
27 |
28 | export default {
29 | account,
30 | application,
31 | notes,
32 | users,
33 | settings,
34 | profile,
35 | layout,
36 | }
37 |
--------------------------------------------------------------------------------
/client/src/lang/fr-FR/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | import account from './account';
21 | import application from './application';
22 | import notes from './notes';
23 | import users from './users';
24 | import settings from './settings';
25 | import profile from './profile';
26 | import layout from './layout';
27 |
28 | export default {
29 | account,
30 | application,
31 | notes,
32 | users,
33 | settings,
34 | profile,
35 | layout,
36 | }
37 |
--------------------------------------------------------------------------------
/client/src/lang/sv-SE/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | import account from './account';
21 | import application from './application';
22 | import notes from './notes';
23 | import users from './users';
24 | import settings from './settings';
25 | import profile from './profile';
26 | import layout from './layout';
27 |
28 | export default {
29 | account,
30 | application,
31 | notes,
32 | users,
33 | settings,
34 | profile,
35 | layout,
36 | }
37 |
--------------------------------------------------------------------------------
/client/src/lang/zh-CN/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | import account from './account';
21 | import application from './application';
22 | import notes from './notes';
23 | import users from './users';
24 | import settings from './settings';
25 | import profile from './profile';
26 | import layout from './layout';
27 |
28 | export default {
29 | account,
30 | application,
31 | notes,
32 | users,
33 | settings,
34 | profile,
35 | layout,
36 | }
37 |
--------------------------------------------------------------------------------
/client/src/index.js:
--------------------------------------------------------------------------------
1 | import 'react-app-polyfill/ie9'; // For IE 9-11 support
2 | import 'react-app-polyfill/stable';
3 | // import 'react-app-polyfill/ie11'; // For IE 11 support
4 | import './polyfill'
5 | import React from 'react';
6 | import ReactDOM from 'react-dom';
7 | import './index.css';
8 | import App from './App';
9 | import * as serviceWorkerRegistration from './serviceWorkerRegistration';
10 | import {Provider} from 'mobx-react';
11 | import {IntlProvider} from 'react-intl';
12 | import {messages} from './lang';
13 | import stores from './stores';
14 |
15 | stores.application.initialize();
16 |
17 | const locale = stores.account.user ? stores.account.user.locale : 'en-US';
18 |
19 | const Root = () => {
20 | return (
21 |
22 |
23 |
24 |
25 |
26 | );
27 | };
28 |
29 | ReactDOM.render(, document.getElementById('root'));
30 |
31 | // If you want your app to work offline and load faster, you can change
32 | // unregister() to register() below. Note this comes with some pitfalls.
33 | // Learn more about service workers: http://bit.ly/CRA-PWA
34 | serviceWorkerRegistration.unregister();
35 |
--------------------------------------------------------------------------------
/client/src/http/SettingsHttpClient.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | import HttpClient from './HttpClient';
21 |
22 | class SettingsHttpClient {
23 | static retrieve() {
24 | const method = 'GET';
25 |
26 | const url = 'settings';
27 |
28 | return HttpClient.request(method, url);
29 | }
30 |
31 | static update(settings) {
32 | const method = 'PUT';
33 |
34 | const url = 'settings';
35 |
36 | return HttpClient.request(method, url, settings);
37 | }
38 | }
39 |
40 | export default SettingsHttpClient;
41 |
--------------------------------------------------------------------------------
/server/public/web.config:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/server/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 | ./tests/Unit
10 |
11 |
12 | ./tests/Feature
13 |
14 |
15 |
16 |
17 | ./app
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/server/resources/lang/en-US/account.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | return [
23 | 'registration' => 'Registration',
24 | 'registrationMessage' => 'Thank you for creating an account at :url, use your credentials to login.',
25 | 'resetPassword' => 'Reset Your Password',
26 | 'resetPasswordMessage' => 'Use the following password to log in to your account, please change your password as soon as you log in.',
27 | 'resetPasswordPreheader' => 'This mail contains your new Plainpad password. Use it to log in and set a new one for your Plainpad account.',
28 | ];
29 |
--------------------------------------------------------------------------------
/server/app/Providers/AuthServiceProvider.php:
--------------------------------------------------------------------------------
1 | 'App\Policies\ModelPolicy',
20 | ];
21 |
22 | /**
23 | * Register any authentication / authorization services.
24 | */
25 | public function boot(): void
26 | {
27 | $this->registerPolicies();
28 |
29 | Auth::viaRequest('custom-token', function ($request) {
30 | $session = Session::where('token', $request->bearerToken())
31 | ->where('expires_at', '>', DB::raw('NOW()'))
32 | ->first();
33 |
34 | if (!$session) {
35 | return null;
36 | }
37 |
38 | $user = User::find($session->user_id);
39 |
40 | if (!$user) {
41 | return null;
42 | }
43 |
44 | config(['app.locale' => $user->locale]);
45 |
46 | return $user;
47 | });
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/client/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dir": "ltr",
3 | "lang": "en",
4 | "name": "Plainpad",
5 | "short_name": "Plainpad",
6 | "theme_color": "#564b65",
7 | "background_color": "#564b65",
8 | "display": "standalone",
9 | "start_url": "./",
10 | "icons": [
11 | {
12 | "src": "assets/img/icon-72x72.png",
13 | "sizes": "72x72",
14 | "type": "image/png"
15 | },
16 | {
17 | "src": "assets/img/icon-96x96.png",
18 | "sizes": "96x96",
19 | "type": "image/png"
20 | },
21 | {
22 | "src": "assets/img/icon-128x128.png",
23 | "sizes": "128x128",
24 | "type": "image/png",
25 | "purpose": "any maskable"
26 | },
27 | {
28 | "src": "assets/img/icon-144x144.png",
29 | "sizes": "144x144",
30 | "type": "image/png"
31 | },
32 | {
33 | "src": "assets/img/icon-152x152.png",
34 | "sizes": "152x152",
35 | "type": "image/png"
36 | },
37 | {
38 | "src": "assets/img/icon-192x192.png",
39 | "sizes": "192x192",
40 | "type": "image/png"
41 | },
42 | {
43 | "src": "assets/img/icon-384x384.png",
44 | "sizes": "384x384",
45 | "type": "image/png"
46 | },
47 | {
48 | "src": "assets/img/icon-512x512.png",
49 | "sizes": "512x512",
50 | "type": "image/png"
51 | }
52 | ],
53 | "splash_pages": null,
54 | "scope": "."
55 | }
56 |
--------------------------------------------------------------------------------
/client/src/http/SessionsHttpClient.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | import HttpClient from './HttpClient';
21 |
22 | class SessionsHttpClient {
23 | static create(email, password) {
24 | const method = 'POST';
25 |
26 | const url = 'sessions';
27 |
28 | const data = {
29 | email,
30 | password
31 | };
32 |
33 | return HttpClient.request(method, url, data);
34 | }
35 |
36 | static delete(session) {
37 | const method = 'DELETE';
38 |
39 | const url = `sessions/${session.token}`;
40 |
41 | return HttpClient.request(method, url);
42 | }
43 | }
44 |
45 | export default SessionsHttpClient;
46 |
--------------------------------------------------------------------------------
/server/resources/lang/sv-SE/account.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | return [
23 | 'registration' => 'Registrering',
24 | 'registrationMessage' => 'Tack för att du skapat ett konto på :url, använd dina kontouppgifter för att logga in.',
25 | 'resetPassword' => 'Återställ ditt lösenord',
26 | 'resetPasswordMessage' => 'Använd detta lösenord för att logga in på ditt kontot, vänligen byt lösenordet när du har loggat in första gången.',
27 | 'resetPasswordPreheader' => 'Detta e-postmeddelande innehåller ditt nya lösenord för Plainpad. Använd det för att logga in och sätta ett nytt lösenord för kontot.',
28 | ];
29 |
--------------------------------------------------------------------------------
/server/app/Models/Setting.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace App\Models;
23 |
24 | use Illuminate\Database\Eloquent\Model;
25 |
26 | class Setting extends Model
27 | {
28 | /**
29 | * Indicates if the IDs are auto-incrementing.
30 | *
31 | * @var bool
32 | */
33 | public $incrementing = false;
34 |
35 | /**
36 | * @var string
37 | */
38 | protected $table = 'settings';
39 |
40 | /**
41 | * The attributes that are mass assignable.
42 | *
43 | * @var array
44 | */
45 | protected $fillable = [
46 | 'name',
47 | 'value',
48 | ];
49 | }
50 |
--------------------------------------------------------------------------------
/client/src/containers/NoteLayout/NoteFooter.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | import React, {Component} from 'react';
21 | import PropTypes from 'prop-types';
22 |
23 | const propTypes = {
24 | children: PropTypes.node,
25 | };
26 |
27 | const defaultProps = {};
28 |
29 | class NoteFooter extends Component {
30 | render() {
31 | // eslint-disable-next-line
32 | const {children, ...attributes} = this.props;
33 |
34 | return (
35 |
36 |
37 |
38 | );
39 | }
40 | }
41 |
42 | NoteFooter.propTypes = propTypes;
43 | NoteFooter.defaultProps = defaultProps;
44 |
45 | export default NoteFooter;
46 |
--------------------------------------------------------------------------------
/client/src/lang/zh-CN/settings.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | settings: '设置',
22 | setting: 'Setting',
23 | defaultLocale: '默认语言',
24 | mail: '邮件配置',
25 | driver: '协议',
26 | host: 'SMTP地址',
27 | port: '端口',
28 | username: '用户名',
29 | password: '密码',
30 | encryption: '加密方式',
31 | fromAddress: '发件邮箱',
32 | fromName: '发件姓名',
33 | save: '保存',
34 | saveSuccess: '保存成功',
35 | saveFailure: '保存失败',
36 | fetchFailure: '无法获取设置',
37 | updates: '更新',
38 | update: 'Update',
39 | newUpdatesAvailable: '有新版本',
40 | beforeUpdatingMakeSure: '更新前,请确保Plainpad的安装目录可写。如果在更新后报错,则需要在终端手动运行“php artisan refresh”命令',
41 | }
42 |
--------------------------------------------------------------------------------
/client/src/storage.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | import localforage from 'localforage';
21 | import account from './stores/account';
22 |
23 | class Storage {
24 | tables = {};
25 |
26 | table(name) {
27 | if (!account.user) {
28 | throw new Error('Cannot access the database without a connected user account.');
29 | }
30 |
31 | if (!this.tables[name]) {
32 | this.tables[name] = localforage.createInstance({
33 | name: `Plainpad-${process.env.REACT_APP_VERSION}-${account.user.id}`,
34 | storeName: name
35 | });
36 | }
37 |
38 | return this.tables[name]
39 | }
40 | }
41 |
42 | export default new Storage();
43 |
--------------------------------------------------------------------------------
/client/src/views/Pages/Page404/Page404.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Button, Col, Container, Input, InputGroup, InputGroupAddon, InputGroupText, Row } from 'reactstrap';
3 |
4 | class Page404 extends Component {
5 | render() {
6 | return (
7 |
31 | );
32 | }
33 | }
34 |
35 | export default Page404;
36 |
--------------------------------------------------------------------------------
/server/app/Models/Session.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace App\Models;
23 |
24 | use Illuminate\Database\Eloquent\Model;
25 |
26 | class Session extends Model
27 | {
28 | /**
29 | * Indicates if the IDs are auto-incrementing.
30 | *
31 | * @var bool
32 | */
33 | public $incrementing = false;
34 |
35 | /**
36 | * @var string
37 | */
38 | protected $table = 'sessions';
39 |
40 | /**
41 | * The attributes that are mass assignable.
42 | *
43 | * @var array
44 | */
45 | protected $fillable = [
46 | 'expires_at',
47 | 'token',
48 | 'user_id'
49 | ];
50 | }
51 |
--------------------------------------------------------------------------------
/client/src/lang/zh-CN/users.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | user: '用户',
22 | users: '用户',
23 | name: '昵称',
24 | email: '邮箱',
25 | password: '密码',
26 | passwordConfirmation: '重复密码',
27 | admin: '管理员',
28 | role: '权限',
29 | actions: '操作',
30 | add: '添加',
31 | edit: '编辑',
32 | save: '保存',
33 | saveSuccess: '保存成功',
34 | saveFailure: '保存失败',
35 | delete: '删除',
36 | deletePrompt: '你确定要删除吗?',
37 | deleteSuccess: '删除成功',
38 | deleteFailure: '删除失败',
39 | cancel: '取消',
40 | search: '搜索',
41 | emailAlreadyInUse: '该邮箱已被使用,请更换其他邮箱',
42 | passwordsMismatch: '密码不匹配,请重试',
43 | listFailure: '列出用户失败,请重试',
44 | filterUsers: '查找用户',
45 | }
46 |
--------------------------------------------------------------------------------
/server/resources/lang/de-DE/account.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | return [
23 | 'registration' => 'Registrierung',
24 | 'registrationMessage' => 'Vielen Dank, dass Sie ein Konto bei :url eingerichtet haben, benutzen Sie Ihre Zugangsdaten zum Einloggen.',
25 | 'resetPassword' => 'Passwort zurücksetzen',
26 | 'resetPasswordMessage' => 'Verwenden Sie das folgende Passwort, um sich in Ihr Konto einzuloggen. Bitte ändern Sie Ihr Passwort, sobald Sie sich einloggen.',
27 | 'resetPasswordPreheader' => 'Diese Mail enthält Ihr neues Plainpad-Passwort. Verwenden Sie es, um sich einzuloggen und ein neues Passwort für Ihr Plainpad-Konto festzulegen.',
28 | ];
29 |
--------------------------------------------------------------------------------
/client/src/http/ApplicationHttpClient.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | import HttpClient from './HttpClient';
21 |
22 | class ApplicationHttpClient {
23 | static retrieve() {
24 | const method = 'GET';
25 |
26 | const url = '';
27 |
28 | return HttpClient.request(method, url, null);
29 | }
30 |
31 | static update() {
32 | const method = 'PUT';
33 |
34 | const url = '';
35 |
36 | return HttpClient.request(method, url, null);
37 | }
38 |
39 | static refresh() {
40 | const method = 'POST';
41 |
42 | const url = 'refresh';
43 |
44 | return HttpClient.request(method, url, null);
45 | }
46 | }
47 |
48 | export default ApplicationHttpClient;
49 |
--------------------------------------------------------------------------------
/server/app/Mail/PasswordRecovered.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace App\Mail;
23 |
24 | use Illuminate\Bus\Queueable;
25 | use Illuminate\Mail\Mailable;
26 | use Illuminate\Queue\SerializesModels;
27 |
28 | class PasswordRecovered extends Mailable
29 | {
30 | use Queueable, SerializesModels;
31 |
32 | public $password;
33 |
34 | public function __construct(string $password)
35 | {
36 | $this->subject = 'Plainpad - ' . __('account.resetPassword');
37 |
38 | $this->password = $password;
39 | }
40 |
41 | public function build()
42 | {
43 | return $this->view('emails.account.password-recovered');
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/client/src/views/Pages/Page500/Page500.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Button, Col, Container, Input, InputGroup, InputGroupAddon, InputGroupText, Row } from 'reactstrap';
3 |
4 | class Page500 extends Component {
5 | render() {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 |
500
13 |
Houston, we have a problem!
14 |
The page you are looking for is temporarily unavailable.
31 | );
32 | }
33 | }
34 |
35 | export default Page500;
36 |
--------------------------------------------------------------------------------
/docs/contributions.md:
--------------------------------------------------------------------------------
1 | ## Contributions
2 |
3 | Being an open source project, Plainpad is interchangeably connected to its community. Anyone can become part of the
4 | evolution of the project and help in the creation of high quality features.
5 |
6 | ### Development
7 |
8 | With collaboration mainly taking place on [GitHub](https://github.com/alextselegidis/plainpad), pull requests
9 | are welcome. Please ensure that you follow the coding guidelines before submitting new code to the project.
10 |
11 | ### Testing
12 |
13 | One of the most important goals of Plainpad is performance and stability which means that quality assurance has to
14 | ensure that problematic cases never reach production instances. Every release has an Alpha and Beta stage that aims
15 | to eliminate any underlying issues.
16 |
17 | ### Suggestions
18 |
19 | Everything you might suggest about the project will be taken into concern and is highly appreciated. Your ideas of new
20 | features and enhancements are very important and will help Plainpad become even better.
21 |
22 | ### Translation
23 |
24 | You are more than welcome to help with the translation progress of the user interface. The application is already
25 | translated into a big variety of languages but as new features are added new strings need to be translated. You can
26 | send your translations with a pull request in GitHub or per email
27 | to [alextselegidis@gmail.com](mailto:alextselegidis@gmail.com)
28 |
29 | [Back](readme.md)
30 |
--------------------------------------------------------------------------------
/client/src/lang/sv-SE/account.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | successfullyLoggedIn: 'Du är inloggad!',
22 | failedToLogIn: 'Någonting gick fel vid inloggningen, vänligen försök igen.',
23 | successfullyLoggedOut: 'Du är utloggad!',
24 | failedToLogOut: 'Någonting gick fel vid utloggningen, vänligen försök igen.',
25 | successfullyRecoveredPassword: 'Ditt lösenord har återställts! Kontrollera din e-post för vidare instruktioner.',
26 | failedToRecoverPassword: 'Någonting gick fel vid återställningen av ditt lösenord, vänligen försök igen.',
27 | invalidateSuccess: 'Cachen har rensats.',
28 | sessionExpired: 'Din session har upphört att gälla, vänligen logga in igen.',
29 | }
30 |
--------------------------------------------------------------------------------
/client/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import {HashRouter, Route, Switch} from 'react-router-dom';
3 | // import { renderRoutes } from 'react-router-config';
4 | import './App.scss';
5 | import RecoverPassword from './views/Pages/RecoverPassword';
6 |
7 | const loading = () =>
Loading...
;
8 |
9 | // Containers
10 | const NoteLayout = React.lazy(() => import('./containers/NoteLayout'));
11 |
12 | // Pages
13 | const Login = React.lazy(() => import('./views/Pages/Login'));
14 | const Page404 = React.lazy(() => import('./views/Pages/Page404'));
15 | const Page500 = React.lazy(() => import('./views/Pages/Page500'));
16 |
17 | class App extends Component {
18 | render() {
19 | return (
20 |
21 |
22 |
23 | } />
24 | } />
25 | } />
26 | } />
27 | } />
28 |
29 |
30 |
31 | );
32 | }
33 | }
34 |
35 | export default App;
36 |
--------------------------------------------------------------------------------
/client/src/lang/en-US/account.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | successfullyLoggedIn: 'You have been successfully logged in!',
22 | failedToLogIn: 'Something went wrong while logging you in, please try again.',
23 | successfullyLoggedOut: 'You have been successfully logged out!',
24 | failedToLogOut: 'Something went wrong while logging you out, please try again.',
25 | successfullyRecoveredPassword: 'Your password has been successfully recovered! Check you emails for further instructions.',
26 | failedToRecoverPassword: 'Something went wrong while recovering your password, please try again.',
27 | invalidateSuccess: 'Cache got reset successfully.',
28 | sessionExpired: 'Your session has expired, please log in again.',
29 | }
30 |
--------------------------------------------------------------------------------
/docker/php-fpm/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM php:8.2-fpm
2 |
3 | WORKDIR "/var/www/html"
4 |
5 | RUN apt-get update \
6 | && apt-get install -y --no-install-recommends \
7 | git \
8 | zip \
9 | unzip \
10 | && curl -sSL https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - | sh -s \
11 | curl gd intl ldap mbstring mysqli odbc pdo pdo_mysql soap sockets xml zip xdebug exif sqlite3 gettext bcmath csv event imap inotify mcrypt redis \
12 | && docker-php-ext-enable xdebug \
13 | && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
14 | && curl -sLS https://deb.nodesource.com/setup_18.x | bash - \
15 | && apt-get install -y nodejs \
16 | && npm install -g npm \
17 | && apt-get install -q -y ssmtp mailutils \
18 | && echo "hostname=localhost.localdomain" > /etc/ssmtp/ssmtp.conf \
19 | && echo "root=root@example.org" >> /etc/ssmtp/ssmtp.conf \
20 | && echo "mailhub=mailpit:1025" >> /etc/ssmtp/ssmtp.conf \
21 | && echo "sendmail_path=/usr/sbin/ssmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini \
22 | && echo "alias ll=\"ls -al\"" >> /root/.bashrc \
23 | && echo "export XDEBUG_TRIGGER=1" >> /root/.bashrc \
24 | && echo "export PHP_IDE_CONFIG=\"serverName=host.docker.internal\"" >> /root/.bashrc \
25 | && apt-get -y autoremove \
26 | && apt-get clean \
27 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
28 |
29 | CMD ["bash", "docker/php-fpm/start-container"]
30 |
--------------------------------------------------------------------------------
/server/app/Http/Middleware/Admin.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace App\Http\Middleware;
23 |
24 | use Closure;
25 | use Illuminate\Http\Request;
26 | use Illuminate\Support\Facades\Auth;
27 | use Symfony\Component\HttpFoundation\Response;
28 |
29 | class Admin
30 | {
31 | /**
32 | * Handle an incoming request.
33 | *
34 | * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
35 | */
36 | public function handle(Request $request, Closure $next, ?string $guard = null): Response
37 | {
38 | $user = Auth::user();
39 |
40 | if (!$user->admin) {
41 | return response('', 401);
42 | }
43 |
44 | return $next($request);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/docker/nginx/nginx.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80 default;
3 |
4 | server_name localhost;
5 |
6 | client_max_body_size 128M;
7 |
8 | access_log /var/log/nginx/application.access.log;
9 |
10 | root /var/www/html;
11 |
12 | index index.php index.html;
13 |
14 | # Map all PHP requests towards the API.
15 |
16 | location /api.php/ {
17 | root /var/www/html/server/public/;
18 | fastcgi_pass php-fpm:9000;
19 | fastcgi_split_path_info ^(.+\.php)(/.+)$;
20 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
21 | fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log";
22 | fastcgi_buffers 16 16k;
23 | fastcgi_buffer_size 32k;
24 | fastcgi_index index.php;
25 | include fastcgi_params;
26 | }
27 |
28 | # Reverse proxy the CRA app.
29 |
30 | location / {
31 | proxy_pass http://php-fpm:3000;
32 | proxy_redirect off;
33 | proxy_set_header Host $host;
34 | proxy_set_header X-Real-IP $remote_addr;
35 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
36 | proxy_set_header X-Forwarded-Host $server_name;
37 | }
38 |
39 | # Reverse proxy the CRA web sockets.
40 |
41 | location /ws {
42 | proxy_pass http://php-fpm:3000;
43 | proxy_http_version 1.1;
44 | proxy_set_header Upgrade $http_upgrade;
45 | proxy_set_header Connection "Upgrade";
46 | }
47 |
48 | location ~ /\.ht {
49 | deny all;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/client/src/lang/fr-FR/account.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | successfullyLoggedIn: 'Vous avez été connecté avec succès !',
22 | failedToLogIn: 'Une erreur s\'est produite lors de la connexion, veuillez réessayer.',
23 | successfullyLoggedOut: 'Vous avez été déconnecté avec succès! ',
24 | failedToLogOut: 'Une erreur s\'est produite lors de la déconnexion, veuillez réessayer.',
25 | successfullyRecoveredPassword: 'Votre mot de passe a été récupéré avec succès ! Vérifiez vos e-mails pour plus d\'instructions.',
26 | failedToRecoverPassword: 'Une erreur s\'est produite lors de la récupération de votre mot de passe, veuillez réessayer.',
27 | invalidateSuccess: 'Le cache a été réinitialisé avec succès.',
28 | sessionExpired: 'Votre session a expiré, veuillez vous reconnecter.',
29 | }
30 |
--------------------------------------------------------------------------------
/client/src/polyfill.js:
--------------------------------------------------------------------------------
1 | /*
2 | * required polyfills
3 | */
4 | import "core-js";
5 | import 'core-js/features/set/map';
6 |
7 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/
8 | // import 'core-js/es6/symbol'
9 | // import 'core-js/es6/object'
10 | // import 'core-js/es6/function'
11 | // import 'core-js/es6/parse-int'
12 | // import 'core-js/es6/parse-float'
13 | // import 'core-js/es6/number'
14 | // import 'core-js/es6/math'
15 | // import 'core-js/es6/string'
16 | // import 'core-js/es6/date'
17 | // import 'core-js/es6/array'
18 | // import 'core-js/es6/regexp'
19 | // import 'core-js/es6/map'
20 | // import 'core-js/es6/weak-map'
21 | // import 'core-js/es6/set'
22 | // import 'core-js/es7/object'
23 |
24 | /** IE10 and IE11 requires the following for the Reflect API. */
25 | // import 'core-js/es6/reflect'
26 |
27 | /** Evergreen browsers require these. **/
28 | // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
29 | // import 'core-js/es7/reflect'
30 |
31 | // CustomEvent() constructor functionality in IE9, IE10, IE11
32 | (function () {
33 |
34 | if ( typeof window.CustomEvent === "function" ) return false
35 |
36 | function CustomEvent ( event, params ) {
37 | params = params || { bubbles: false, cancelable: false, detail: undefined }
38 | var evt = document.createEvent( 'CustomEvent' )
39 | evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail )
40 | return evt
41 | }
42 |
43 | CustomEvent.prototype = window.Event.prototype
44 |
45 | window.CustomEvent = CustomEvent
46 | })()
47 |
--------------------------------------------------------------------------------
/client/src/lang/zh-CN/notes.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | notes: '笔记',
22 | note: '笔记',
23 | saved: '已保存',
24 | pin: '置顶',
25 | unpin: '取消置顶',
26 | unpinFailure: '该笔记不可取消置顶',
27 | download: '下载',
28 | share: '分享',
29 | shareSuccess: '分享成功',
30 | shareFailure: '分享失败',
31 | delete: '删除',
32 | deletePrompt: '你确定要删除吗?',
33 | search: '搜索',
34 | syncFailure: '笔记同步失败',
35 | filter: '搜索',
36 | keyword: '关键词',
37 | newNote: '新建笔记',
38 | add: '添加',
39 | created: '创建于',
40 | modified: '修改于',
41 | characters: '字符',
42 | selectNote: '选择笔记',
43 | selectNoteInformation: '从注释列表中选择注释后,此面板将显示有用的信息和操作',
44 | welcome: '欢迎使用!',
45 | selectNoteOrCreate: '选择一个现有的笔记或创建一个新笔记',
46 | conflict: 'Conflict',
47 | syncingGotDisabled: '由于未知错误,笔记同步已被禁用',
48 | notFoundOrNotSynced: '笔记不存在或尚未同步',
49 | }
50 |
--------------------------------------------------------------------------------
/client/src/lang/de-DE/account.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | successfullyLoggedIn: 'Sie haben sich erfolgreich angemeldet!',
22 | failedToLogIn: 'Beim Einloggen ist etwas schief gegangen, bitte versuchen Sie es noch einmal.',
23 | successfullyLoggedOut: 'Sie sind erfolgreich abgemeldet worden!',
24 | failedToLogOut: 'Etwas ist beim Ausloggen schief gelaufen, bitte versuchen Sie es noch einmal.',
25 | successfullyRecoveredPassword: 'Ihr Passwort wurde erfolgreich wiederhergestellt! Prüfen Sie Ihre E-Mails für weitere Anweisungen.',
26 | failedToRecoverPassword: 'Bei der Wiederherstellung Ihres Passworts ist etwas schief gelaufen, bitte versuchen Sie es erneut.',
27 | invalidateSuccess: 'Cache wurde erfolgreich zurückgesetzt.',
28 | sessionExpired: 'Ihre Sitzung ist abgelaufen, bitte loggen Sie sich erneut ein.',
29 | }
30 |
--------------------------------------------------------------------------------
/server/bootstrap/app.php:
--------------------------------------------------------------------------------
1 | withRouting(
10 | using: function () {
11 | Route::middleware('api')
12 | ->group(base_path('routes/api.php'));
13 |
14 | Route::middleware('web')
15 | ->group(base_path('routes/console.php'));
16 | },
17 | health: '/up',
18 | )
19 | ->withMiddleware(function (Middleware $middleware) {
20 | $middleware->api(prepend: [
21 | \Illuminate\Http\Middleware\HandleCors::class,
22 | ]);
23 |
24 | $middleware->alias([
25 | 'admin' => \App\Http\Middleware\Admin::class,
26 | ]);
27 |
28 | $middleware->validateCsrfTokens(except: [
29 | '*',
30 | ]);
31 |
32 | // For API-only application, return 401 instead of redirecting to login route
33 | $middleware->redirectGuestsTo(fn () => abort(401, 'Unauthenticated'));
34 | })
35 | ->withExceptions(function (Exceptions $exceptions) {
36 | //
37 | })
38 | ->withProviders([
39 | \App\Providers\AppServiceProvider::class,
40 | \App\Providers\AuthServiceProvider::class,
41 | \App\Providers\EventServiceProvider::class,
42 | \App\Providers\RouteServiceProvider::class,
43 | \App\Providers\MailConfigServiceProvider::class,
44 | \App\Providers\AutoUpdateServiceProvider::class,
45 | ])
46 | ->create();
47 |
--------------------------------------------------------------------------------
/server/database/migrations/2019_11_19_085128_create_settings_table.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | use Illuminate\Support\Facades\Schema;
23 | use Illuminate\Database\Schema\Blueprint;
24 | use Illuminate\Database\Migrations\Migration;
25 |
26 | class CreateSettingsTable extends Migration
27 | {
28 | /**
29 | * Run the migrations.
30 | *
31 | * @return void
32 | */
33 | public function up()
34 | {
35 | Schema::create('settings', function (Blueprint $table) {
36 | $table->string('id')->primary();
37 | $table->timestamps();
38 | $table->string('name');
39 | $table->longText('value');
40 | });
41 | }
42 |
43 | /**
44 | * Reverse the migrations.
45 | *
46 | * @return void
47 | */
48 | public function down()
49 | {
50 | Schema::dropIfExists('settings');
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/client/src/lang/zh-CN/profile.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | profile: '个人信息',
22 | settings: '设置',
23 | name: '姓名',
24 | email: '电子邮件',
25 | password: '密码',
26 | passwordConfirmation: '重复密码',
27 | locale: '语言',
28 | view: '布局',
29 | comfortable: '宽松',
30 | compact: '紧凑',
31 | line: '间隔',
32 | full: '宽',
33 | narrow: '窄',
34 | sort: '排序',
35 | lastModifiedFirst: '按修改排序',
36 | lastCreatedFirst: '按创建排序',
37 | alphabetically: '按名称排序',
38 | theme: '主题',
39 | dark: '暗黑的',
40 | light: '明亮的',
41 | save: '保存',
42 | saveSuccess: '保存成功',
43 | saveFailure: '保存失败',
44 | fetchFailure: '无法获取配置信息',
45 | application: '应用',
46 | install: '安装',
47 | youCanInstallPlainpad: '此服务器可以安装Plainpad',
48 | invalidateCache: '无效的缓存',
49 | encrypt: '加密',
50 | yes: '是',
51 | no: '否',
52 | passwordsMismatch: '密码不匹配,请重试',
53 | invalidateCachePrompt: '确定要清除本地缓存吗?未同步的信息将会丢失'
54 | }
55 |
--------------------------------------------------------------------------------
/server/app/Http/Controllers/V1/SettingsController.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace App\Http\Controllers\V1;
23 |
24 | use App\Http\Controllers\Controller;
25 | use App\Models\Setting;
26 | use Illuminate\Http\Request;
27 |
28 | class SettingsController extends Controller
29 | {
30 | public function retrieve()
31 | {
32 | $settings = Setting::all()->mapWithKeys(function ($setting) {
33 | return [$setting['name'] => $setting['value']];
34 | });
35 |
36 | return response()->json($settings);
37 | }
38 |
39 | public function update(Request $request)
40 | {
41 | $settings = $request->input();
42 |
43 | foreach ($settings as $name => $value) {
44 | Setting::where('name', $name)->update([
45 | 'value' => (string)$value
46 | ]);
47 | }
48 |
49 | return response('', 200);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/client/src/lang/en-US/users.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | user: 'User',
22 | users: 'Users',
23 | name: 'Name',
24 | email: 'Email',
25 | password: 'Password',
26 | passwordConfirmation: 'Password Confirmation',
27 | admin: 'Admin',
28 | role: 'Role',
29 | actions: 'Actions',
30 | add: 'Add',
31 | edit: 'Edit',
32 | save: 'Save',
33 | saveSuccess: 'User saved successfully.',
34 | saveFailure: 'User could not be saved.',
35 | delete: 'Delete',
36 | deletePrompt: 'Are you sure you want to delete this user?',
37 | deleteSuccess: 'User deleted successfully.',
38 | deleteFailure: 'User could not be deleted.',
39 | cancel: 'Cancel',
40 | search: 'Search',
41 | emailAlreadyInUse: 'The email address is already in use, please use another one.',
42 | passwordsMismatch: 'The passwords mismatch, please try again.',
43 | listFailure: 'Users could not be listed, please try again.',
44 | filterUsers: 'Filter Users',
45 | }
46 |
--------------------------------------------------------------------------------
/server/app/Models/User.php:
--------------------------------------------------------------------------------
1 |
25 | */
26 | protected $fillable = [
27 | 'name',
28 | 'email',
29 | 'admin',
30 | 'password',
31 | 'locale',
32 | 'view',
33 | 'line',
34 | 'sort',
35 | 'theme',
36 | 'encrypt',
37 | ];
38 |
39 | /**
40 | * The attributes that should be guarded.
41 | *
42 | * @var array
43 | */
44 | protected $guarded = [
45 | 'created_at',
46 | 'updated_at'
47 | ];
48 |
49 | /**
50 | * The attributes that should be hidden for arrays.
51 | *
52 | * @var array
53 | */
54 | protected $hidden = [
55 | 'password',
56 | ];
57 |
58 | /**
59 | * Get the attributes that should be cast.
60 | *
61 | * @return array
62 | */
63 | protected function casts(): array
64 | {
65 | return [
66 | 'encrypt' => 'boolean',
67 | 'admin' => 'boolean',
68 | 'email_verified_at' => 'datetime',
69 | 'password' => 'hashed',
70 | ];
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/client/src/lang/en-US/settings.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | settings: 'Settings',
22 | setting: 'Setting',
23 | defaultLocale: 'Default Locale',
24 | mail: 'Mail',
25 | driver: 'Driver',
26 | host: 'Host',
27 | port: 'Port',
28 | username: 'Username',
29 | password: 'Password',
30 | encryption: 'Encryption',
31 | fromAddress: 'From Address',
32 | fromName: 'From Name',
33 | save: 'Save',
34 | saveSuccess: 'Settings saved successfully.',
35 | saveFailure: 'Settings could not be saved.',
36 | fetchFailure: 'Settings could not be fetched.',
37 | updates: 'Updates',
38 | update: 'Update',
39 | newUpdatesAvailable: 'There are new updates available for download.',
40 | beforeUpdatingMakeSure: 'Before updating make sure that the Plainpad installation directory is writable by the PHP process. In case the update ends with an error, you may have to manually run the "php artisan refresh" command from the terminal in order to finalize the process.',
41 | }
42 |
--------------------------------------------------------------------------------
/client/src/lang/sv-SE/settings.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | settings: 'Inställningar',
22 | setting: 'Inställning',
23 | defaultLocale: 'Standardspråk',
24 | mail: 'E-post',
25 | driver: 'Anslutning',
26 | host: 'Server',
27 | port: 'Port',
28 | username: 'Användarnamn',
29 | password: 'Lösenord',
30 | encryption: 'Kryptering',
31 | fromAddress: 'Från-adress',
32 | fromName: 'Från-namn',
33 | save: 'Spara',
34 | saveSuccess: 'Inställningarna har sparats.',
35 | saveFailure: 'Inställningarna kunde inte sparas.',
36 | fetchFailure: 'Inställningarna kunde inte hämtas.',
37 | updates: 'Uppdateringar',
38 | update: 'Uppdatera',
39 | newUpdatesAvailable: 'Det finns nya uppdateringar att hämta.',
40 | beforeUpdatingMakeSure: 'Innan uppdatering utförs, se till så att installationsmappen är skrivbar för PHP-processen. Om uppdateringen avslutas med ett fel, så behöver du köra "php artisan refresh" manuellt från terminalprompten för att slutföra uppdateringen.',
41 | }
42 |
--------------------------------------------------------------------------------
/server/app/Providers/MailConfigServiceProvider.php:
--------------------------------------------------------------------------------
1 | where('name', 'like', 'mail_%')
37 | ->get()
38 | ->mapWithKeys(function ($setting) {
39 | return [$setting->name => $setting->value];
40 | });
41 |
42 | if ($settings->isEmpty()) {
43 | return;
44 | }
45 |
46 | $config = [
47 | 'driver' => $settings['mail_driver'],
48 | 'host' => $settings['mail_host'],
49 | 'port' => $settings['mail_port'],
50 | 'encryption' => $settings['mail_encryption'],
51 | 'username' => $settings['mail_username'],
52 | 'password' => $settings['mail_password'],
53 | 'from' => [
54 | 'address' => $settings['mail_from_address'],
55 | 'name' => $settings['mail_from_name']
56 | ]
57 | ];
58 |
59 | Config::set('mail', $config);
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/server/config/hashing.php:
--------------------------------------------------------------------------------
1 | 'bcrypt',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Bcrypt Options
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may specify the configuration options that should be used when
26 | | passwords are hashed using the Bcrypt algorithm. This will allow you
27 | | to control the amount of time it takes to hash the given password.
28 | |
29 | */
30 |
31 | 'bcrypt' => [
32 | 'rounds' => env('BCRYPT_ROUNDS', 10),
33 | ],
34 |
35 | /*
36 | |--------------------------------------------------------------------------
37 | | Argon Options
38 | |--------------------------------------------------------------------------
39 | |
40 | | Here you may specify the configuration options that should be used when
41 | | passwords are hashed using the Argon algorithm. These will allow you
42 | | to control the amount of time it takes to hash the given password.
43 | |
44 | */
45 |
46 | 'argon' => [
47 | 'memory' => 1024,
48 | 'threads' => 2,
49 | 'time' => 2,
50 | ],
51 |
52 | ];
53 |
--------------------------------------------------------------------------------
/docs/installation.md:
--------------------------------------------------------------------------------
1 | ## Installation
2 |
3 | Plainpad is a web application that can be installed and run in web servers. Users will be able to reach the application
4 | through their web browsers by using an active internet connection, just like visiting a normal website. The installation
5 | process is very similar to the one required by the popular PHP framework Laravel, so it is very likely that you will be
6 | familiar with the next steps. Follow this article strictly in order to complete the installation with no problems.
7 |
8 | ### Server Requirements
9 |
10 | * Apache/NGINX
11 | * MySQL
12 | * PHP >= 7.3
13 | * BCMath PHP Extension
14 | * Ctype PHP Extension
15 | * Fileinfo PHP extension
16 | * JSON PHP Extension
17 | * Mbstring PHP Extension
18 | * OpenSSL PHP Extension
19 | * PDO PHP Extension
20 | * Tokenizer PHP Extension
21 | * XML PHP Extension
22 |
23 | ### Steps
24 |
25 | Plainpad requires a few steps and minimum configuration for the installation to your server.
26 |
27 | 1. Upload the contents of the zip archive to your server.
28 | 1. Make sure the web server is configured to only serve the `public` directory.
29 | 1. Create an `.env` file based on the `.env.example` provided and enter your configuration values.
30 | 1. Run `php artisan migrate:fresh --seed` to set up the database.
31 |
32 | Alternatively you can open the browser to the `/url/to/public/setup.php` file and submit the
33 | installation form.
34 |
35 | Make sure the entire application directory is completely writable by the PHP process so that the auto update feature
36 | works properly.
37 |
38 | ### Useful Links
39 |
40 | * [Official Laravel Installation Guide](https://laravel.com/docs/8.x/installation)
41 | * [Deploy Laravel To Shared Hosting](https://youtu.be/6g8G3YQtQt4)
42 |
43 | [Back](readme.md)
44 |
--------------------------------------------------------------------------------
/client/src/lang/sv-SE/users.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | user: 'Användare',
22 | users: 'Användare',
23 | name: 'Namn',
24 | email: 'E-post',
25 | password: 'Lösenord',
26 | passwordConfirmation: 'Upprepa lösenord',
27 | admin: 'Administratör',
28 | role: 'Roll',
29 | actions: 'Kommandon',
30 | add: 'Lägg till',
31 | edit: 'Redigera',
32 | save: 'Spara',
33 | saveSuccess: 'Användaren har sparats.',
34 | saveFailure: 'Användaren kunde inte sparas.',
35 | delete: 'Radera',
36 | deletePrompt: 'Är du säker på att du vill radera användaren?',
37 | deleteSuccess: 'Användaren raderades.',
38 | deleteFailure: 'Användaren kunde inte raderas.',
39 | cancel: 'Avbryt',
40 | search: 'Sök',
41 | emailAlreadyInUse: 'E-postadressen används redan, vänligen ange en annan e-postadress.',
42 | passwordsMismatch: 'Lösenorden matchar inte, vänligen försök igen.',
43 | listFailure: 'Det gick inte att visa användare, vänligen försök igen.',
44 | filterUsers: 'Filtrera användare',
45 | }
46 |
--------------------------------------------------------------------------------
/server/database/seeders/UsersSeeder.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace Database\Seeders;
23 |
24 | use Illuminate\Database\Seeder;
25 | use Illuminate\Support\Facades\DB;
26 | use Illuminate\Support\Facades\Hash;
27 | use Illuminate\Support\Str;
28 |
29 | class UsersSeeder extends Seeder
30 | {
31 | /**
32 | * Run the database seeds.
33 | *
34 | * @return void
35 | */
36 | public function run()
37 | {
38 | DB::table('users')->insert([
39 | 'id' => (string)Str::uuid(),
40 | 'created_at' => date('Y-m-d H:i:s'),
41 | 'updated_at' => date('Y-m-d H:i:s'),
42 | 'name' => 'Admin',
43 | 'email' => 'admin@example.org',
44 | 'password' => Hash::make('12345678'),
45 | 'locale' => 'en-US',
46 | 'encrypt' => false,
47 | 'admin' => true,
48 | ]);
49 |
50 | echo 'Login with the default admin user (email: admin@example.org & password: 12345678).' . PHP_EOL;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/server/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'null'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Broadcast Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the broadcast connections that will be used
26 | | to broadcast events to other systems or over websockets. Samples of
27 | | each available type of connection are provided inside this array.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'pusher' => [
34 | 'driver' => 'pusher',
35 | 'key' => env('PUSHER_APP_KEY'),
36 | 'secret' => env('PUSHER_APP_SECRET'),
37 | 'app_id' => env('PUSHER_APP_ID'),
38 | 'options' => [
39 | 'cluster' => env('PUSHER_APP_CLUSTER'),
40 | 'useTLS' => true,
41 | ],
42 | ],
43 |
44 | 'redis' => [
45 | 'driver' => 'redis',
46 | 'connection' => 'default',
47 | ],
48 |
49 | 'log' => [
50 | 'driver' => 'log',
51 | ],
52 |
53 | 'null' => [
54 | 'driver' => 'null',
55 | ],
56 |
57 | ],
58 |
59 | ];
60 |
--------------------------------------------------------------------------------
/client/src/lang/de-DE/settings.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | settings: 'Einstellungen',
22 | setting: 'Einstellunge',
23 | defaultLocale: 'Standard-Sprachumgebung',
24 | mail: 'Mail',
25 | driver: 'Treiber',
26 | host: 'Host',
27 | port: 'Port',
28 | username: 'Username',
29 | password: 'Passwort',
30 | encryption: 'Verschlüsselung',
31 | fromAddress: 'Von Adresse',
32 | fromName: 'Von Name',
33 | save: 'speichern',
34 | saveSuccess: 'Einstellungen erfolgreich gespeichert.',
35 | saveFailure: 'Einstellungen konnten nicht gespeichert werden.',
36 | fetchFailure: 'Einstellungen konnten nicht abgerufen werden.',
37 | updates: 'Updates',
38 | update: 'Update',
39 | newUpdatesAvailable: 'Es sind neue Updates zum Herunterladen verfügbar.',
40 | beforeUpdatingMakeSure: 'Vor dem Update, stell dich sicher, dass das Plainpad-Installationsverzeichnis durch den PHP-Prozess beschreibbar ist. Falls das Update mit einem Fehler endet, musst du eventuell manuell den Befehl "php artisan refresh" vom Terminal aus ausführen, um den Prozess abzuschließen.',
41 | }
42 |
--------------------------------------------------------------------------------
/server/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | make(Illuminate\Contracts\Console\Kernel::class);
34 |
35 | $status = $kernel->handle(
36 | $input = new Symfony\Component\Console\Input\ArgvInput,
37 | new Symfony\Component\Console\Output\ConsoleOutput
38 | );
39 |
40 | /*
41 | |--------------------------------------------------------------------------
42 | | Shutdown The Application
43 | |--------------------------------------------------------------------------
44 | |
45 | | Once Artisan has finished running, we will fire off the shutdown events
46 | | so that any final work may be done by the application before we shut
47 | | down the process. This is the last thing to happen to the request.
48 | |
49 | */
50 |
51 | $kernel->terminate($input, $status);
52 |
53 | exit($status);
54 |
--------------------------------------------------------------------------------
/client/src/lang/fr-FR/users.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | user: 'Utilisateur',
22 | users: 'Utilisateurs',
23 | name: 'Nom',
24 | email: 'E-mail',
25 | password: 'Mot de passe',
26 | passwordConfirmation: 'Confirmation mot de passe',
27 | admin: 'Administrateur',
28 | role: 'Rôle',
29 | actions: 'Actions',
30 | add: 'Ajouter',
31 | edit: 'Éditer',
32 | save: 'Sauver',
33 | saveSuccess: 'Utilisateur enregistré avec succès.',
34 | saveFailure: 'L\'utilisateur n\'a pas pu être enregistré.',
35 | delete: 'Supprimer',
36 | deletePrompt: 'Voulez-vous vraiment supprimer cet utilisateur ?',
37 | deleteSuccess: 'Utilisateur supprimé avec succès.',
38 | deleteFailure: 'L\'utilisateur n\'a pas pu être supprimé.',
39 | cancel: 'Annuler',
40 | search: 'Chercher',
41 | emailAlreadyInUse: 'L\'adresse e-mail est déjà utilisée, veuillez en utiliser une autre.',
42 | passwordsMismatch: 'Les mots de passe ne correspondent pas, veuillez réessayer.',
43 | listFailure: 'Les utilisateurs n\'ont pas pu être répertoriés, veuillez réessayer.',
44 | filterUsers: 'Filtrer les utilisateurs',
45 | }
46 |
--------------------------------------------------------------------------------
/client/src/lang/de-DE/users.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | user: 'Benutzer',
22 | users: 'Benutzer',
23 | name: 'Name',
24 | email: 'E-Mail',
25 | password: 'Passwort',
26 | passwordConfirmation: 'Passwort Bestätigung',
27 | admin: 'Admin',
28 | role: 'Rolle',
29 | actions: 'Aktionen',
30 | add: 'hinzufügen',
31 | edit: 'bearbeiten',
32 | save: 'speichern',
33 | saveSuccess: 'Benutzer erfolgreich gespeichert.',
34 | saveFailure: 'Benutzer konnte nicht gespeichert werden.',
35 | delete: 'löschen',
36 | deletePrompt: 'Sind Sie sicher, dass Sie diesen Benutzer löschen möchten??',
37 | deleteSuccess: 'Benutzer erfolgreich gelöscht.',
38 | deleteFailure: 'Benutzer konnte nicht gelöscht werden.',
39 | cancel: 'stornieren',
40 | search: 'suchen',
41 | emailAlreadyInUse: 'Die E-Mail-Adresse ist bereits in Gebrauch, bitte verwenden Sie eine andere.',
42 | passwordsMismatch: 'Die Passwörter stimmen nicht überein, bitte versuchen Sie es erneut.',
43 | listFailure: 'Benutzer konnten nicht aufgelistet werden, bitte versuchen Sie es erneut.',
44 | filterUsers: 'Benutzer filtern',
45 | }
46 |
--------------------------------------------------------------------------------
/client/src/views/Notes/WelcomeMessage.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | import React, {Component} from 'react';
21 | import {inject, observer} from 'mobx-react';
22 | import {Button, Jumbotron} from 'reactstrap';
23 | import {FormattedMessage} from 'react-intl';
24 |
25 | class WelcomeMessage extends Component {
26 | render() {
27 | const {
28 | notes
29 | } = this.props;
30 |
31 | return (
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
46 |
47 |
48 | )
49 | }
50 | }
51 |
52 | export default inject('notes')(
53 | observer(WelcomeMessage)
54 | );
55 |
--------------------------------------------------------------------------------
/client/src/lang/fr-FR/settings.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | settings: 'Réglages',
22 | setting: 'Réglage',
23 | defaultLocale: 'Paramètres régionaux par défaut',
24 | mail: 'E-mail',
25 | driver: 'Driver',
26 | host: 'Hôte',
27 | port: 'Port',
28 | username: 'Nom d\'utilisateur',
29 | password: 'Mot de passe',
30 | encryption: 'Chiffrement',
31 | fromAddress: 'De l\'adresse',
32 | fromName: 'Du Nom',
33 | save: 'Sauver',
34 | saveSuccess: 'Paramètres enregistrés avec succès.',
35 | saveFailure: 'Les paramètres n\'ont pas pu être enregistrés.',
36 | fetchFailure: 'Les paramètres n\'ont pas pu être récupérés.',
37 | updates: 'Mises à jour',
38 | update: 'Mettre à jour',
39 | newUpdatesAvailable: 'De nouvelles mises à jour sont disponibles en téléchargement.',
40 | beforeUpdatingMakeSure: 'Avant la mise à jour, assurez-vous que le répertoire d\'installation de Plainpad est accessible en écriture par le processus PHP. Dans le cas où la mise à jour se termine par une erreur, vous devrez peut-être exécuter manuellement la commande "php artisan refresh" depuis le terminal afin de finaliser le processus.',
41 | }
42 |
--------------------------------------------------------------------------------
/server/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "laravel/laravel",
3 | "type": "project",
4 | "description": "The Laravel Framework.",
5 | "keywords": [
6 | "framework",
7 | "laravel"
8 | ],
9 | "license": "MIT",
10 | "require": {
11 | "php": "^8.2",
12 | "ext-curl": "*",
13 | "ext-json": "*",
14 | "ext-zip": "*",
15 | "composer/semver": "^3.3",
16 | "desarrolla2/cache": "2.1.*",
17 | "guzzlehttp/guzzle": "^7.8",
18 | "laravel/framework": "^12.0",
19 | "laravel/tinker": "^2.10"
20 | },
21 | "require-dev": {
22 | "fakerphp/faker": "^1.23",
23 | "laravel/pint": "^1.13",
24 | "mockery/mockery": "^1.6",
25 | "nunomaduro/collision": "^8.1",
26 | "phpunit/phpunit": "^11.0"
27 | },
28 | "config": {
29 | "optimize-autoloader": true,
30 | "preferred-install": "dist",
31 | "sort-packages": true
32 | },
33 | "extra": {
34 | "laravel": {
35 | "dont-discover": []
36 | }
37 | },
38 | "autoload": {
39 | "psr-4": {
40 | "App\\": "app/",
41 | "Database\\Factories\\": "database/factories/",
42 | "Database\\Seeders\\": "database/seeders/"
43 | }
44 | },
45 | "autoload-dev": {
46 | "psr-4": {
47 | "Tests\\": "tests/"
48 | }
49 | },
50 | "minimum-stability": "dev",
51 | "prefer-stable": true,
52 | "scripts": {
53 | "post-autoload-dump": [
54 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
55 | "@php artisan package:discover --ansi"
56 | ],
57 | "post-root-package-install": [
58 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
59 | ],
60 | "post-create-project-cmd": [
61 | "@php artisan key:generate --ansi"
62 | ]
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/server/database/migrations/2019_11_19_081344_create_notes_table.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | use Illuminate\Support\Facades\Schema;
23 | use Illuminate\Database\Schema\Blueprint;
24 | use Illuminate\Database\Migrations\Migration;
25 |
26 | class CreateNotesTable extends Migration
27 | {
28 | /**
29 | * Run the migrations.
30 | *
31 | * @return void
32 | */
33 | public function up()
34 | {
35 | Schema::create('notes', function (Blueprint $table) {
36 | $table->string('id')->primary();
37 | $table->string('user_id');
38 | $table->timestamps();
39 | $table->text('title')->nullable();
40 | $table->longText('content')->nullable();
41 | $table->boolean('pinned')->default(false);
42 |
43 | $table->foreign('user_id')
44 | ->references('id')->on('users')
45 | ->onDelete('cascade');
46 | });
47 | }
48 |
49 | /**
50 | * Reverse the migrations.
51 | *
52 | * @return void
53 | */
54 | public function down()
55 | {
56 | Schema::dropIfExists('notes');
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/client/src/lang/en-US/notes.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | notes: 'Notes',
22 | note: 'Note',
23 | saved: 'Saved',
24 | pin: 'Pin',
25 | unpin: 'Unpin',
26 | unpinFailure: 'Note could not be unpinned.',
27 | download: 'Download',
28 | share: 'Share',
29 | shareSuccess: 'Note shared successfully.',
30 | shareFailure: 'Note could not be shared.',
31 | delete: 'Delete',
32 | deletePrompt: 'Are you sure that you want to delete this note?',
33 | search: 'Search',
34 | syncFailure: 'Notes could not be synced.',
35 | filter: 'Filter',
36 | keyword: 'Keyword',
37 | newNote: 'New Note',
38 | add: 'Add',
39 | created: 'Created',
40 | modified: 'Modified',
41 | characters: 'Characters',
42 | selectNote: 'Select A Note',
43 | selectNoteInformation: 'This panel will display useful information and actions once you select a note from the note list.',
44 | welcome: 'Welcome!',
45 | selectNoteOrCreate: 'Select a note or create a new one.',
46 | conflict: 'Conflict',
47 | syncingGotDisabled: 'The note synchronization got disabled due to unexpected errors.',
48 | notFoundOrNotSynced: 'The note was not found or is not synced yet.',
49 | }
50 |
--------------------------------------------------------------------------------
/client/src/lang/sv-SE/notes.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | notes: 'Anteckningar',
22 | note: 'Anteckning',
23 | saved: 'Sparad',
24 | pin: 'Fäst',
25 | unpin: 'Lossa',
26 | unpinFailure: 'Anteckningen kunde inte lossas.',
27 | download: 'Ladda ned',
28 | share: 'Dela',
29 | shareSuccess: 'Anteckningen har delats.',
30 | shareFailure: 'Anteckningen kunde inte delas.',
31 | delete: 'Radera',
32 | deletePrompt: 'Är du säker på att du vill radera anteckningen?',
33 | search: 'Sök',
34 | syncFailure: 'Anteckningar kunde inte synkas.',
35 | filter: 'Filter',
36 | keyword: 'Nyckelord',
37 | newNote: 'Ny anteckning',
38 | add: 'Lägg till',
39 | created: 'Skapad',
40 | modified: 'Ändrad',
41 | characters: 'Tecken',
42 | selectNote: 'Välj en anteckning',
43 | selectNoteInformation: 'Panelen kommer att visa användbar information och alternativ när du valt en anteckning från listan.',
44 | welcome: 'Välkommen!',
45 | selectNoteOrCreate: 'Välj en anteckning eller skapa en ny.',
46 | conflict: 'Konflikt',
47 | syncingGotDisabled: 'Synkningen av anteckningen har stängts av pga oväntade fel.',
48 | notFoundOrNotSynced: 'Anteckningen kunde inte hittas eller har inte synkats än.',
49 | }
50 |
--------------------------------------------------------------------------------
/client/src/lang/sv-SE/profile.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | profile: 'Profil',
22 | settings: 'Inställningar',
23 | name: 'Namn',
24 | email: 'E-post',
25 | password: 'Lösenord',
26 | passwordConfirmation: 'Upprepa lösenord',
27 | locale: 'Språk',
28 | view: 'Visa',
29 | comfortable: 'Bekväm',
30 | compact: 'Kompakt',
31 | line: 'Linje',
32 | full: 'Fullständig',
33 | narrow: 'Smal',
34 | sort: 'Sortera',
35 | lastModifiedFirst: 'Senast ändrad först',
36 | lastCreatedFirst: 'Senast skapad först',
37 | alphabetically: 'Alfabetisk ordning',
38 | theme: 'Tema',
39 | dark: 'Mörkt',
40 | light: 'Ljust',
41 | save: 'Spara',
42 | saveSuccess: 'Profilen har sparats.',
43 | saveFailure: 'Profilen kunde inte sparas.',
44 | fetchFailure: 'Profilen kunde inte hämtas.',
45 | application: 'Applikation',
46 | install: 'Installera',
47 | youCanInstallPlainpad: 'Du kan installera Plainpad och använda det direkt från värddatorn.',
48 | invalidateCache: 'Rensa cache',
49 | encrypt: 'Kryptera',
50 | yes: 'Ja',
51 | no: 'Nej',
52 | passwordsMismatch: 'Lösenorden matchar inte, vänligen försök igen.',
53 | invalidateCachePrompt: 'Är du säker på att du vill rensa den lokala cachen? Ej synkad information kommmer att försvinna!'
54 | }
55 |
--------------------------------------------------------------------------------
/client/src/lang/en-US/profile.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | profile: 'Profile',
22 | settings: 'Settings',
23 | name: 'Name',
24 | email: 'Email',
25 | password: 'Password',
26 | passwordConfirmation: 'Password Confirmation',
27 | locale: 'Locale',
28 | view: 'View',
29 | comfortable: 'Comfortable',
30 | compact: 'Compact',
31 | line: 'Line',
32 | full: 'Full',
33 | narrow: 'Narrow',
34 | sort: 'Sort',
35 | lastModifiedFirst: 'Last Modified First',
36 | lastCreatedFirst: 'Last Created First',
37 | alphabetically: 'Alphabetically',
38 | theme: 'Theme',
39 | dark: 'Dark',
40 | light: 'Light',
41 | save: 'Save',
42 | saveSuccess: 'Profile saved successfully.',
43 | saveFailure: 'Profile could not be saved.',
44 | fetchFailure: 'Profile could not be fetched.',
45 | application: 'Application',
46 | install: 'Install',
47 | youCanInstallPlainpad: 'You can install Plainpad and access it directly from the host machine.',
48 | invalidateCache: 'Invalidate Cache',
49 | encrypt: 'Encrypt',
50 | yes: 'Yes',
51 | no: 'No',
52 | passwordsMismatch: 'The provided passwords mismatch, please try again.',
53 | invalidateCachePrompt: 'Are you sure that you want to invalidate the local cache? Not synchronized information will be lost.'
54 | }
55 |
--------------------------------------------------------------------------------
/client/src/lang/fr-FR/notes.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | notes: 'Notes',
22 | note: 'Note',
23 | saved: 'Sauver',
24 | pin: 'Épingler',
25 | unpin: 'Détacher',
26 | unpinFailure: 'La note n\'a pas pu être détachée.',
27 | download: 'Télécharger',
28 | share: 'Partager',
29 | shareSuccess: 'Note partagée avec succès.',
30 | shareFailure: 'La note n\'a pas pu être partagée.',
31 | delete: 'Supprimer',
32 | deletePrompt: 'Voulez-vous vraiment supprimer cette note ?',
33 | search: 'Chercher',
34 | syncFailure: 'Les notes n\'ont pas pu être synchronisées.',
35 | filter: 'Filtre',
36 | keyword: 'Mot-clé',
37 | newNote: 'Nouvelle note',
38 | add: 'Ajouter',
39 | created: 'Créé',
40 | modified: 'Modifié',
41 | characters: 'Caractères',
42 | selectNote: 'Sélectionnez une note',
43 | selectNoteInformation: 'Ce panneau affichera des informations et des actions utiles une fois que vous aurez sélectionné une note dans la liste des notes.',
44 | welcome: 'Bienvenu·e!',
45 | selectNoteOrCreate: 'Sélectionnez une note ou créez-en une nouvelle.',
46 | conflict: 'Conflit',
47 | syncingGotDisabled: 'La synchronisation des notes a été désactivée en raison d\'erreurs inattendues.',
48 | notFoundOrNotSynced: 'La note n\'a pas été trouvée ou n\'est pas encore synchronisée.',
49 | }
50 |
--------------------------------------------------------------------------------
/client/src/lang/de-DE/notes.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | notes: 'Notizen',
22 | note: 'Notiz',
23 | save: 'speichern',
24 | pin: 'anheften',
25 | unpin: 'loslösen',
26 | unpinFailure: 'Die Notiz konnte nicht losgelöst werden.',
27 | download: 'herunterladen',
28 | share: 'teilen',
29 | shareSuccess: 'Notiz erfolgreich geteilt.',
30 | shareFailure: 'Notiz konnte nicht geteilt werden.',
31 | delete: 'löschen',
32 | deletePrompt: 'Sind Sie sicher, dass Sie diese Notiz löschen möchten?',
33 | search: 'suchen',
34 | syncFailure: 'Notizen konnten nicht synchronisiert werden.',
35 | filter: 'filtern',
36 | keyword: 'Stichwort',
37 | newNote: 'neue Notiz',
38 | add: 'hinzufügen',
39 | created: 'Erstellt',
40 | modified: 'Angepasst',
41 | characters: 'Zeichen',
42 | selectNote: 'Notiz Auswählen',
43 | selectNoteInformation: 'Diese Anzeige zeigt nützliche Informationen und Aktionen an, sobald Sie eine Notiz aus der Notizliste auswählen.',
44 | welcome: 'Willkommen!',
45 | selectNoteOrCreate: 'Wählen Sie eine Notiz aus oder erstellen Sie eine neue Notiz.',
46 | conflict: 'Konflikt',
47 | syncingGotDisabled: 'Die Notensynchronisation wurde aufgrund von unerwarteten Fehlern deaktiviert.',
48 | notFoundOrNotSynced: 'Die Notiz wurde nicht gefunden oder ist noch nicht synchronisiert.',
49 | }
50 |
--------------------------------------------------------------------------------
/client/src/lang/fr-FR/profile.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | profile: 'Profile',
22 | settings: 'Réglages',
23 | name: 'Nom',
24 | email: 'E-mail',
25 | password: 'Mot de passe',
26 | passwordConfirmation: 'Confirmation mot de passe',
27 | locale: 'Traduction',
28 | view: 'Vue',
29 | comfortable: 'Comfortable',
30 | compact: 'Compact',
31 | line: 'Ligne',
32 | full: 'Plein',
33 | narrow: 'Étroit',
34 | sort: 'Sort',
35 | lastModifiedFirst: 'Dernière modification en premier',
36 | lastCreatedFirst: 'Dernier créé en premier',
37 | alphabetically: 'Alphabétiquement',
38 | theme: 'Thème',
39 | dark: 'sombre',
40 | light: 'Clair',
41 | save: 'Sauver',
42 | saveSuccess: 'Profil enregistré avec succès.',
43 | saveFailure: 'Le profil n\'a pas pu être enregistré.',
44 | fetchFailure: 'Impossible de récupérer le profil.',
45 | application: 'Application',
46 | install: 'Installer',
47 | youCanInstallPlainpad: 'Vous pouvez installer Plainpad et y accéder directement depuis la machine hôte.',
48 | invalidateCache: 'Invalider le cache',
49 | encrypt: 'Chiffrer',
50 | yes: 'Oui',
51 | no: 'Non',
52 | passwordsMismatch: 'Les mots de passe fournis ne correspondent pas, veuillez réessayer.',
53 | invalidateCachePrompt: 'Êtes-vous sûr de vouloir invalider le cache local ? Les informations non synchronisées seront perdues.'
54 | }
55 |
--------------------------------------------------------------------------------
/client/src/scss/_variables.scss:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | $blue: #4da3ff !default;
21 | $indigo: #7e3cf0 !default;
22 | $purple: #564b65 !default;
23 | $pink: #e673a8 !default;
24 | $red: #d94e5c !default;
25 | $orange: #fc9744 !default;
26 | $yellow: #ffce3b !default;
27 | $green: #53a663 !default;
28 | $teal: #bbc7c3 !default;
29 | $cyan: #17a2b8 !default;
30 |
31 | $primary: $purple;
32 | $secondary: #ced4da;
33 |
34 | $body-bg: #fff;
35 |
36 | $grid-gutter-width: 15px !default;
37 |
38 | $border-radius: 0;
39 |
40 | $navbar-brand-width: 205px;
41 | $navbar-active-color: #fff;
42 |
43 | $sidebar-width: 250px;
44 | $sidebar-bg: rgba(0, 0, 0, 0);
45 | $sidebar-nav-link-color: #212529;
46 | $sidebar-nav-link-active-bg: rgba(0, 0, 0, 0);
47 | $sidebar-nav-link-active-color: $primary;
48 | $sidebar-footer-bg: none;
49 | $sidebar-bg: #fff;
50 | $sidebar-color: #212529;
51 |
52 | $card-border-radius: 0;
53 | $card-cap-bg: #fff;
54 |
55 | $input-color: #212529;
56 | $input-border-color: #c8ced3;
57 |
58 | $input-border-radius: 0;
59 | $input-border-radius-lg: 0;
60 | $input-border-radius-sm: 0;
61 |
62 | $btn-border-radius: 0;
63 | $btn-border-radius-lg: 0;
64 | $btn-border-radius-sm: 0;
65 |
66 | $dropdown-border-radius: 0;
67 |
68 | $modal-content-border-radius: 0;
69 |
70 | $custom-select-border-radius: 0;
71 |
72 | $sidebar-nav-link-padding-x: .5rem;
73 |
74 | $dark-gray: #40484f;
75 |
--------------------------------------------------------------------------------
/client/src/lang/de-DE/profile.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | export default {
21 | profile: 'Profil',
22 | settings: 'Einstellungen',
23 | name: 'Name',
24 | email: 'E-Mail',
25 | password: 'Passwort',
26 | passwordConfirmation: 'Passwort Bestätigung',
27 | locale: 'Sprachumgebung',
28 | view: 'Ansicht',
29 | comfortable: 'Komfortable',
30 | compact: 'Kompakt',
31 | line: 'Zeile',
32 | full: 'Voller',
33 | narrow: 'Eng',
34 | sort: 'Sortierung',
35 | lastModifiedFirst: 'Zuletzt modifiziert zuerst',
36 | lastCreatedFirst: 'Zuletzt erstelltes zuerst',
37 | alphabetically: 'Alphabetisch',
38 | theme: 'Theme',
39 | dark: 'Dunkles',
40 | light: 'Helles',
41 | save: 'speichern',
42 | saveSuccess: 'Profil erfolgreich gespeichert.',
43 | saveFailure: 'Profil konnte nicht gespeichert werden.',
44 | fetchFailure: 'Profil konnte nicht abgerufen werden.',
45 | application: 'Applikation',
46 | install: 'installieren',
47 | youCanInstallPlainpad: 'Sie können Plainpad installieren und direkt vom Host-Rechner aus darauf zugreifen.',
48 | invalidateCache: 'Cache invalidieren',
49 | encrypt: 'Verschlüsseln',
50 | yes: 'Ja',
51 | no: 'Nein',
52 | passwordsMismatch: 'Die angegebenen Passwörter stimmen nicht überein, bitte versuchen Sie es erneut.',
53 | invalidateCachePrompt: 'Sind Sie sicher, dass Sie den lokalen Cache invalidieren wollen? Nicht synchronisierte Informationen werden verloren gehen.'
54 | }
55 |
--------------------------------------------------------------------------------
/server/database/migrations/2019_11_19_081328_create_users_table.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | use Illuminate\Support\Facades\Schema;
23 | use Illuminate\Database\Schema\Blueprint;
24 | use Illuminate\Database\Migrations\Migration;
25 |
26 | class CreateUsersTable extends Migration
27 | {
28 | /**
29 | * Run the migrations.
30 | *
31 | * @return void
32 | */
33 | public function up()
34 | {
35 | Schema::create('users', function (Blueprint $table) {
36 | $table->string('id')->primary();
37 | $table->timestamps();
38 | $table->string('name');
39 | $table->string('email');
40 | $table->string('password');
41 | $table->string('locale')->default('en-US');
42 | $table->enum('view', ['comfortable', 'compact'])->default('compact');
43 | $table->enum('line', ['full', 'narrow'])->default('full');
44 | $table->enum('sort', ['modified', 'created', 'alphabetical'])->default('modified');
45 | $table->enum('theme', ['light', 'dark'])->default('light');
46 | $table->boolean('encrypt')->default(false);
47 | $table->boolean('admin')->default(false);
48 | });
49 | }
50 |
51 | /**
52 | * Reverse the migrations.
53 | *
54 | * @return void
55 | */
56 | public function down()
57 | {
58 | Schema::dropIfExists('users');
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/server/.env.example:
--------------------------------------------------------------------------------
1 | # This value is the name of your application. This value is used when the
2 | # framework needs to place the application's name in a notification or
3 | # any other location as required by the application or its packages.
4 | APP_NAME=Plainpad
5 |
6 | # This value determines the "environment" your application is currently
7 | # running in. This may determine how you prefer to configure various
8 | # services the application utilizes. Set this in your ".env" file.
9 | APP_ENV=production
10 |
11 | # This key is used by the Illuminate encrypter service and should be set
12 | # to a random, 32 character string, otherwise these encrypted strings
13 | # swill not be safe. Please do this before deploying an application and
14 | # make sure you do not lose this key!
15 | APP_KEY={KEY}
16 |
17 | # When your application is in debug mode, detailed error messages with
18 | # stack traces will be shown on every error that occurs within your
19 | # application. If disabled, a simple generic error page is shown.
20 | APP_DEBUG=false
21 |
22 | # This URL is used by the console to properly generate URLs when using
23 | # the Artisan command line tool. You should set this to the root of
24 | # your application so that it is used when running Artisan tasks.
25 | APP_URL={URL}
26 |
27 | # This URL is used by the auto update mechanism to resolve available updates
28 | # whenever available. Change this only if you have your own Plainpad repository
29 | # configured.
30 | APP_REPOSITORY=https://cdn.alextselegidis.com/plainpad/updates/stable
31 |
32 | # Here you may specify which of the database connections below you wish
33 | # to use as your default connection for all database work. Of course
34 | # you may use many connections at once using the Database library.
35 | DB_CONNECTION=mysql
36 |
37 | # The database connection host, this defaults to "localhost" for most servers.
38 | DB_HOST={DB_HOST}
39 |
40 | # The database connection port, this defaults to "3306" for most servers.
41 | DB_PORT=3306
42 |
43 | # The database name to connect to, make sure the database is created.
44 | DB_DATABASE={DB_NAME}
45 |
46 | # The database username for the connection.
47 | DB_USERNAME={DB_USERNAME}
48 |
49 | # The database password for the connection.
50 | DB_PASSWORD={DB_PASSWORD}
51 |
--------------------------------------------------------------------------------
/client/src/containers/NoteLayout/NoteCopyright.js:
--------------------------------------------------------------------------------
1 | /*
2 | Plainpad - Self Hosted Note Taking App
3 |
4 | Copyright (C) Alex Tselegidis - https://alextselegidis.com
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see
18 | */
19 |
20 | import React from 'react';
21 | import vendorLogo from '../../assets/img/brand/alextselegidis-logo.png';
22 | import appLogo from '../../assets/img/brand/plainpad-logo.png';
23 | import {Col, Row} from 'reactstrap';
24 |
25 | class NoteCopyright extends React.Component {
26 | render() {
27 | return (
28 |