jyoungblood / darkwave Goto Github PK
View Code? Open in Web Editor NEWPragmatic web application development kit
Home Page: http://darkwave.ltd
License: MIT License
Pragmatic web application development kit
Home Page: http://darkwave.ltd
License: MIT License
NEW VERSION 2024 (pre-HEQ) - 0.6.3
new slime + jy deps + document other new changes? - from this commit: 24b2ebd
?? any new easy quick features? (fine if not)
dw roadmap & project cleanup
?? new dw version 0.6.1 (looks like it's been started?) what's new? users stuff?
not using new dw for blu, but want to get reference material sorted (some of it is applicable)
simple initial & usable docs site (using evolution of readme & demo material
functional demo (just the demo page, maybe a login app but you can’t write to it…still do the login tho)
public roadmap (sort siyuan roadmap, move important ones to GH)
dw 0.6.3 - user updates for auth routes
isset(GLOBALS['is_admin'])
--> !(isset(GLOBALS['is_admin']))
for user-edit (which is the crud example for everything) - only use save/delete if $GLOBALS['user_id'] == $user['_id'] or isset($GLOBALS['is_admin'])
see sme - /donation/{donation_id}
if (!isset(GLOBALS['is_admin']) && donation['donor_user_id'])){
for the user ones it could be
if (!(isset(GLOBALS['is_admin'])) || _POST['id']){
for others use the record lookup
_POST['_id']."'"); if (!(isset(GLOBALS['is_admin'])) || user['data'][0]['id']){
this is, like, everything i want to do with this system. need to sort it out into individual issues and make a roadmap.
0.7 - NEXT BIG CHANGES
db defaults/conventions -- url_title
—> url_slug
... or seo_slug ?? slug?
sticky table headers
position: sticky; top: 0;
to the thead but that doesn’t work with this?? use htmx for …. ajaxy htmx stuff
css - need to include (blank) breakpoints for css (s/m/l/xl)
arbitrary auth groups
“right way” auth setup
$GLOBALS['auth']
var? (better way to check than isset()?)security patch/checkup (mitigate risks, make it as impervious to MOST threats as possible)
base theme (no tabler)
html web components
**HTML Web Components Are Having a Moment -**https://cloudfour.com/thinks/html-web-components-are-having-a-moment/
?? native web components possible? - https://daverupert.com/2021/10/html-with-superpowers/
LEARN
html custom elements / web components
?? easiest way to create/define
https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements
native components example - https://blog.jim-nielsen.com/2023/web-components-icon-galleries/
html web components - https://blog.jim-nielsen.com/2023/html-web-components/
**HTML web components -**https://adactio.com/journal/20618
curated list of awesome framework-agnostic standalone web components - https://github.com/davatron5000/awesome-standalones#element-extensions
**The Good, The Bad, and The Web Components - Zach Leatherman | JSHeroes 2023 -**https://www.youtube.com/watch?v=R4Ri4ft7bXY
Web Components Eliminate JavaScript Framework Lock-in - https://jakelazaroff.com/words/web-components-eliminate-javascript-framework-lock-in/
pre-built ui components based on lit - https://shoelace.style/
figure out FE / ui css base
templates/controllers org - just move the auth stuff back to their original places? (and not dw namespaced?)
ROADMAP
auth routes hack for titles in HEAD requests?
mostly for my purposes, if i paste a url into trello for a route that's admin only, it says "401 unauthorized"
would like to still have it render the title that would be rendered for the page if unauthorized
dw forms next
back-end error validation / reporting
modals dismiss by hitting enter (er, hitting enter has the same effect as focusing the big button and clicking)
modals - running validation on modal forms? (like on the close event, add a function that runs the default form validation?) … ok to just be a pattern (copy/paste code)
dw.js - add radio_validate() functionality
want to hook this to the same error reporting as the rest (so there's only 1 error dialog)
i did something that works for the SME donation form, but would like an easier more “integrated” solution (don’t want to have to write custom validation for this shit)
db creation stuff - should we enforce encoding colation? or should that just be the developer’s responsibility?
ideally should be:
boilerplate - ?? should auth-forgot (et al) do the same kind of validation & submission prevention the other (normal) forms (like register) are doing? (forgot doesn't)
global email theme / templates (for auth registration & pw reset emails)
use html email templates for registration/reset emails? - see SME (email to haley on dontation submit)
dw email templates
dw - add global email templates
html email w/ hbs?
\\\\VPHP\\\\x::email_send([
'to' => '[email protected]',
// 'to' => '[email protected]',
'from' => '"'.$_ENV['SITE_TITLE'].'" <notifications@'.$_ENV['MAILGUN_DOMAIN'].'>',
'subject' => 'New test from debug w template ',
'html' => true,
'message' => render::handlebars([
'layout' => '_layouts/email',
'template' => 'email/new-donation',
'data' => [
'donation' => $donation,
'donor' => $donor
]
])
]);
dw default use html email template that matches site style
cool default email templates (similar to the style of blu/api.o or this: https://github.com/mailgun/transactional-email-templates )
remove datepicker altogether? native html date fields are fine (and pretty good now)
dw-utilities-js - form_validate - mark "required" fields that have had values filled OK for the next pass
dw register form - submit on enter?
x-on:keydown.enter="submit()"
like login formdw custom field validation rules
cool to be able to add custom checks (callback/ pass-through function) to "save" or "delete" helpers
dw demo/docs - need to note the versions of each library/fw being included? (like alpine, etc)
dw wysiwyg solution w/ alpine/tw? - https://codepen.io/ScottWindon/full/dyOJqMq
dw default (users edit) add redirect params (from SME - {{#if GET.redirect}}{{GET.redirect}}{{else}}/users/{{/if}}
)
dw org - should the users list/edit be part of the regular templates? (instead of in the dw folder?)
dw bug (all "unauthorized" templates)
'template' => 'error',
i think it's just like that on users
auth-account doesn't have it (but maybe it should?)
dw auth - should "unauth" checks on templates/routes also check for auth?
if (isset(GLOBALS['is_admin'])){
if (!isset(GLOBALS['auth']) && !isset($GLOBALS['is_admin']))){
dw - default unauthorized message - "you are not authorized to view this page"
it's like that in most places but in some it's "use this resource"
** actually this is probably fine …. the “resource” message is on api routes only (right?) **
dw save - not always run on first click (feels broken) ... is it the validate function? doesn't consistently happen, but it happens and it feels broken
dw authenticate() - need ability to manage what's saved with locals.identity? (ex, for sme i wanted to add email and show it instead of screenname
dw default base - multiple id="navbar-menu" ... submenu should be id="navbar-submenu"
?? should .gitignore block .ini files? (sme has user.ini & php.ini ... we want them in this repo, but is it normal to not want them?)
dw - should composer-create be hxgf/darkwave instead of hxgf/dw?
test - try other dbs (sqlite, postgres)
what about using env vars for other vphp stuff that expects GLOBALS vars? (ex: email_send)
bug / weird thing? on our server (eqkh) if i don’t have the cpanel rules (for the ea/php.ini settings), on every few page loads the nav links are all the default color (purple) before they’re changed to the right one (FOUT but just for the nav links) … everything else (even tabler-related stuff) is pretty much the same
auth - groups update
set up auth the “right” way
auth / middleware - set up auth middleware & app container
latest version in desktop folder: dw/dw-future/fw-auth-middleware.php
determine ideal middleware + container setup
?? **Authentication With Slim 4 -**https://www.youtube.com/watch?v=3Hg2WPwDyG8&t=5s
want to watch this whole series?
?? where is this auth package coming from?
slim basic auth - https://github.com/tuupola/slim-basic-auth
?? figure out the right time to run the middleware (after we’ve checked for auth & before rendering the controller/template
?? get the middleware to work with an app container
FUCK IT I AM SO TIRED OF FUCKING WITH THIS
publish composer package (& include w/ dw)
easiest & most effective way to do session auth? need to be able to lock someone out / revoke their access (if logged in)
should we do actual sessions? (instead of just an open-ended cookie)
db vs stateless?
using actual php sessions?
https://mcvendrell.medium.com/a-simple-login-auth-project-with-slim-framework-4-29f73d4e1d55
session middleware - https://discourse.slimframework.com/t/slim4-session-data/3487
auth middleware?
security lockout - also want to be able to lock people (any users) out by changing their password and/or adding them to the block list or deleting their accounts (break existing logins/sessions…none of this works rn)
make the “blocked” user group work (it won’t do new logins, but won’t revoke any current logins)
https://www.php.net/manual/en/features.session.security.management.php
https://stackoverflow.com/questions/9001702/php-session-destroy-on-log-out-button
example concept w/ other fw (enhance)
misc auth notes from twitter posts
Imagine building an app without thinking about any of this - https://twitter.com/devagrawal09/status/1686978368246280192
Session, cookie, JWT, token, SSO, and OAuth 2.0 - what are they? - https://twitter.com/bytebytego/status/1685895102445879296
“just match credentials on login, send back a 12-hour JWT, and store it in local storage. Send the JWT on each request. Use some built-in JWT middleware and authorisation policies in your API. Access ID and claims from JWT. Done in less than a few hours.” - https://twitter.com/jtalsby/status/1685417655879249920
Using JWT authentication middleware as a line of defense in a PHP API. - https://twitter.com/garyclarketech/status/1723709286629388507
Navigating the World of JWT: A Comprehensive Guide - https://ssojet.com/blog/navigating-the-world-of-jwt-a-comprehensive-guide/?ref=dailydev
security - risk mitigation (middleware updates, etc)
slim4 security options https://odan.github.io/slim4-skeleton/security.html
JWT updates?
actually probably don’t want to use JWT w/ new auth
figure out the right way to do jwt
set explicit expiration (& renew while using the site)
set extra claims required for oauth support
do we need to pw verify the auth token?
jwt security best practices?
CORS, CSRF, XSS
csrf cookie - double-submit technique? - https://stackoverflow.com/questions/27067251/where-to-store-jwt-in-browser-how-to-protect-against-csrf#:~:text=JWT should be stored in,site from any other site.
slime symlink security patch
?? More secure structure - set docroot to "public" subfolder (keep config outside publicly accessible areas)
subfolder of symlinks that you make the root folder
or just field guide instructions on “a more secure installation”
get the composer package (utilities) to work as a standalone package (idk why it not working now? 500 errors when i try to use a function)
PHP Fatal error: Uncaught Error: Class "DW\\dw" not found in /home/darkwave/dev.darkwave.ltd/index.php:54
tail -f /home/darkwave/logs/dev_darkwave_ltd.php.error.log
?? what is wrong here?
?? try using a different namespace? (Darkwave)
make whatever required changes and publish again (just re-do 0.1)
web components for more complex features (photo uploads)
clean up header links (css/js - minimize libs, only include uploads on upload pages, etc)
tabler tweaks wanted
actually, the really problem is: we can’t customize tabler styles w/ :root{} ?
modal foot
scrollbar style shouldn't change (bs default)
kill tabler (& make a customized default theme?)
dw ui - just bs by default, GET params to view demo w/ various ui kits (tabler, hope, mdb, etc)
want to be bs-only … bring your own customizations / components if you want
build w/ your own ui kit (tabler if you want, or hope, bolt, mdb, etc)
alt ui kits (include all the “big” ones)
<script src="<https://cdn.jsdelivr.net/npm/[email protected]/js/mdb.min.js>"></script>
<link href="<https://cdn.jsdelivr.net/npm/[email protected]/css/mdb.min.css>" rel="stylesheet">
?? kill tabler && Dw —> mdb/hope (mit), lift whatever tabler customizations
?? or kill bs altogether and use shoelace or something?
controllers/index.php - is it faster to individually require dw files?
we’re doing this bc after install/config it deletes the config controller
?? do we need to have a primer on adding routes? (remember to link/require the file in index.php)
dw demo/index updates
index is just resources
?? index header update
move demo / styleguide to /demo
index demo - things you can do w/ the special libs
tablesort
tinymce
dropzone / uppy
litepicker
index demo - return links to theme builders?
For more developed UI kits and design systems, check out <a href="<https://tabler.io/>" target="_blank">Tabler</a>, <a href="<https://hopeui.iqonic.design/>" target="_blank">Hope UI</a>, <a href="<https://mdbootstrap.com/>" target="_blank">MDB</a>, and <a href="<https://demo.themesberg.com/volt/>" target="_blank">Volt</a>.
readme add badges (if there’s any relevant info we want to communicate quickly) - https://badgers.space/
actually use htmx - idk how it would best be integrated
?? dw “utilities” pkgs (js, php) —> “dw core utilities” (single package?)
actual tabler theme? - tabler/tabler#1260
index demo - have a page in the docs that has the same content as the index demo
dw - authorized api endpoints - anything client-accessed (save, delete, etc) should require auth
index demo / docs - want to generate a nice-looking cleaned-up version of structure diagram (from goodnotes) using [draw.io](http://draw.io/)
index demo future more advanced examples
plugin/module for pwa features (app icon, manifest, metadata, etc)
special version for easy deploy on vercel? - pdo w/ postgres
?? want to remove installation process
install/config future - other default tables to write? (option to include sample content? (blog, sample users, etc)
install - requirement pre-flight check script
pre-check (so you can see which features are available...tell people what they need to change in order to make it compatible...maybe offer a script?)
install reqs
install - more robust error checking/handling - on error show error (in modal?)
incorrect db creds
files/dirs need to be writeable?
couldn’t write file
missing required fields?
other error?
error test / correct logic flow (for edge cases, what happens if “initialize db” is not selected and “create admin user” is
configuration script - check to make sure all required drivers are present
someone had an issue w/ their setup - #1
want more verbose error reporting if there's an error like this (server/env config)
edge edge case - missing isset() checks on variables in dw::authorize()
this happens if you're logged in but delete the contents of the .env file
dw::convert_image() - support more config options
see everything we can do here https://github.com/gumlet/php-image-resize
?? additional photo manipulation config
support animated gifs
alt image conversion lib (gives us more options for effects too) - spatie image - https://github.com/spatie/image
uploads - do an example of auto-save after upload (move save routes from /save to its own api route that just saves the photos to the appropriate record (ex users)
upload BE - create media/* folders if they don’t exist
if (!is_dir($_SERVER['DOCUMENT_ROOT'] . '/images/avatars/')) {
mkdir($_SERVER['DOCUMENT_ROOT'] . '/images/avatars/', 0755, true);
}
dw.upload_initialize() config tweaks
dz_options.uploadmultiple - should show error? it doesn’t
update preview_html
param
can we have template literals use values from upload_initialize (cfg, r, id)
?? OK NOW ability to custom define what post-upload looks like (currently it’s just mirroring what’s in the ‘’preview-image’ block
?? OK NOW set custom preview_html param in dw.photo_upload_initialize() cfg (can’t do it now bc js errors from vars in in template
gracefully support non-photo uploads (like jcdv files)
cfg test/evolution - what if we wanted to overlay the dropzone on the image preview?
upgrade to dropzone 6 (when it’s out of beta)
Dropzone.autoDiscover = false;
dw dz upload - make the avatar preview a dropzone still hover to delete/crop, but the controls are outside the dropzone
add easy cropping lib (default options to crop avatars, constrain to proportions, etc)
alt crop lib
modify backend photo resize to accommodate crop
add gallery module (jcdv/mst)
better default avatar (maybe one that looks like a person or something?)
try integrating glide as an image resizing service
composer require league/glide-slim
setup is kinda complex, maybe too much work for now
can we even get it to work w/ slim4? will it break in the future?
emails “from” address default / var in .env settings
do we need to have a .env.example file? installation writes whatever, and we can just have an example in the docs?
want to replace {{locals.year}}
w/ {{date "now" "Y"}}
if so, do we want to change slime defaults?
?? slime - remove year from locals?
components/partials for header nav bar(s)?
possible to do header injection w/ subnav partials?
?? maybe w/ dynamic partials?
header tweak - can we get hover states to work? (want to change opacity to .5 or .75 on hover)
header tweak - separate “system” dropdown menu for admins? or better default wording to note which options (ie users) are system and which are personal? should this just be a gears icon? or just the avatar?
theme dark mode (+ header toggle, like tabler preview)
search demo evolution (users)
add pagination
add search filters?
highlight specific search terms
more advanced search parameters (group, date joined range, etc)
link to reset
form save buttons (account/user-edit) - alt save behavior options
“working-inline” version (save & reload behavior)
on save set save button to "working" state (instead of body)
on success, show message (instead of redirect)
or change button content - add loading icon & label for “saving” and check icon & label for “saved”
easy/elegant save & reload option like jcdv?
?? dropdown button w/ more options - copy/duplicate record, etc
admin controls to re-send validation/pw links?
users list - show if a user hasn’t been validated
user-edit - (if not activated) add links to re-send activation link? & forgot pw hash link?
submit ALL forms (login & edit) w/ cmd + enter
edit can currently be submitted w/ ctrl + enter, but i can’t get cmd to register for some reason
according to alpine docs you can use meta, but it doesn’t work - https://alpinejs.dev/directives/on
i was also using an event listener, but maybe there’s a working solution that’s cleaner? (using the alpine syntax?)
document.querySelector('.edit-form').addEventListener('keydown', function (e) {
if (e.keyCode == 13 && e.metaKey) {
document.querySelector('[data-container="save"] button').click();
}
});
dependencies / perf - would love to have better default pagespeed scores, but don’t want to have to do a bunch of extra crazy config/setup stuff to get it
evolve error templates
make it work for 500 errors? (or show any kind of error)
make it work for any kind of error (401, etc)
and figure out the right places to trigger (w/ auth middleware, i guess)
REF - most common http status codes (src - https://hackernoon.com/the-system-design-cheat-sheet-api-styles-rest-graphql-websocket-webhook-rpcgrpc-soap )
2xx - Acknowledge and Success
3xx - Redirection
4xx - Client Error
5xx - Server Error
space for detailed messages (verbose reporting)
error handling how-to https://www.slimframework.com/docs/v4/middleware/error-handling.html
i just want to edit the default slim error template
all the http error codes - https://www.google.com/search?q=http status codes cheat sheet&tbm=isch&hl=en-us&client=safari&sa=X&ved=0CHQQrNwCKAJqFwoTCIiqwKrcuf4CFQAAAAAdAAAAABAF&biw=375&bih=626#imgrc=Qbg6cfmLO6y47M&lnspr=W10=
figure out the ideal rich text editor solution (quill still good? tinymce better? or something else?)
ux - email notifications - styled templates (instead of plain text emails)
ux - fine-tune the ux writing for auth process (want it to be generic but also nice and thoughtful)
?? onboard kitchen sink / elements page
dark mode + Easy themes - change the look of the app w a single style sheet , css vars, nice to have default light/dark mode options
there is a default theme you can edit, and a place to put your own styles (styles.css)
want to call them skins, have a single css file you can swap in and change the look
theme catalog on the docs site?
admin themes - cool to have a few different defaults? (corporate, glassmorph, neuomorph, cyberpunk, win95, etc)
Dw themes that look like sites i’ve built Vrc Jcdv Blu Cb Etc
dw.api_request
return error & error message for connection/server errors (currently not sending anything
return {
error_type: 'connection',
error_message: 'Network error, check your connection and try again.'
}
to be read in client as r.error.type, r.error.message
dw.js - handle cookies like js cookie
dw.js - make dw.api_fetch work (make api requests w/ fetch instead of XHR)
example usage from svelte experiment - https://bitbucket.org/purimage/blu-client/src/master/src/components/Login.svelte
make api_fetch work without the data parameter/object (formbody_encode throws an error if it’s not there, but want to be able to make a request w/ just the url param)
dw_fetch formbody progressive enhancement? - https://www.bram.us/2022/04/22/progressive-enhancement-and-html-forms-use-formdata/
dw.js - anything else we want to integrate from 0x00 version?
in js/_o/lib
https://bitbucket.org/purimage/blu-client/src/master/src/lib/dw-utils.js
?? could be used w/ module pattern:
<script type="module">
import dw from './js/dw-utils.js';
dw.what();
</script>
?? desired fixes
dw.js - .form_validate() required add support for radios & checkboxes
i came up with a way to do this for sme (see donate-form)
honestly i hate doing this kind of shit without jquery...it's just too hard and it's against the spirit of the framework
dw.js - dw.toast() & dw.alert() - js triggers similar to modal, markup written and added dynamically using bootstrap components
dw.js modal - close modal (click primary button) by pressing "enter”
dw.js - modal - ?? is there a better way to trigger modals from js?
dw.js - dw.modal() future
// fixit form submit function
// 'form': dw.serialize(document.querySelector('#' + modal_id+ ' form'))
pre-configured “success” and “error” methods (ex: dw.modal.error())
more button alignment options
// 2-col w-100 buttons
<div class="w-100">
<div class="row">
<div class="col"><a href="#" class="btn w-100" data-bs-dismiss="modal">
Go to dashboard
</a></div>
<div class="col"><a href="#" class="btn btn-success w-100" data-bs-dismiss="modal">
View invoice
</a></div>
</div>
</div>
// also would love a full-width single button
more modal alignment options? (top/bottom/middle left/right/center)
would love to have a “pre-load” callback - so a function/action can be called when the modal is launched, then action can be done (form can be loaded, etc), maybe with an optional loading spinner?
modal - cool to have a flag to destroy after close? (the markup is left on the page otherwise)
modal - trigger click on primary/action modal button on “enter” keyup (esp if there’s only one)
dw.validate_input()
make “unique” and “required” play nice (currently not throwing “required” error if there are both “unique” and “required” rules)
validation evolution (how to do it in an elegant way that can be extended)
checking type (is it an email?)
checking for uniqueness (is there a match of this in this specific table?)
would love to have a list of several kinds of errors
ex: required email for registration should be (and show errors for)
make sure any errors are always sticky (’is-invalid’ class shouldn’t disappear until the validation error is resolved
also see oma - i did a simple regex email validate function on /apply/1
dw.form_validate()
check that there are no error/invalid classes before returning “valid”
FE components for complex functionality
components w/ args in lightncandy? - zordius/lightncandy#294
package more complex components (uploader, text editor, etc) as web components w/ lit - https://lit.dev/
would shoelace help? https://shoelace.style/
?? how do we do this for dw/slime? - Componetizing chunks of html+css+js as single file components is incredibly useful, blade templates? (you can call templates as components and pass arguments?)
FE dependencies - want to use asset packagist?
ext - x-utils / vphp email_send - send w/ smtp by default (& document easy config for sending email notifications w/ smtp creds in system screen, like pocketbase setup)
ext - more hbs helpers (either add them here or use the new standalone hbs helpers (slime)
security - should the “register” routes be disabled by default (for security?)
middleware - public access - accept every http method from any location
auth middleware public support (explicitly set routes to be accessible from anywhere
for public calls, access control allow origin from all?
set headers to allow every http method from every location
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: *");
header('Access-Control-Request-Method: GET, POST, PUT, DELETE, PATCH, COPY, SEARCH, HEAD, OPTIONS');
middleware - making $req vars automatically available in templates?
stereo render_template - automatically send GET and POST variables to templates!
?? also make GET/POST vars automatically available in forms?
plugin - BAAS suite
CMS functionality via plugins (admin panels, data editors, user mgmt, etc) - BAAS functionality
manage ux copy
manage password requirement rules
data collection manager
theme editor
lite version of pocketbase, supabase, etc
VERY EASY BAAS functions
plugin - turn-key global notifictations (in header nav, like in tabler demo)
plugin - premium auth/security suite - more “best practices” than the default
?? Slime dw passkey ? Oauth?
oauth / 3rd-party login
support for passkeys? (need oauth implementation? need to change how we're doing auth?)
text/email verification codes (connect your own trello accont)
special auth/config changes for security (jwt tokens regenerate/expire, sessions, etc)
plugin - site settings update
plugin - favicons? - do we care? nice defaults & links to where to go to generate more?
plugin - to send welcome email (from user screen & by default on user create, settings managed in app)
saas-related plugins - generic privacy policy & terms of service boilerplate
?? system/admin - ux copy settings manager
would it be cool to have a central place in the admin to manage the wording of all of the login/forgot pages? (like a “ux copy settings” page?)
also the wording of the notification emails?
?? system/admin - do we want to support variable names for auth process links (/forgot, /login, etc) - currently hard-coded in back-end and templates
add blu/mst seo_slug to js utilities?
function seo_slug(text) {
// stereo url slug does this?? #[^\\pL\\pN./-]+#
return text.trim().replace("'", '').replace('"', '').replace(/[^A-Z0-9.-]+/ig, "-").toLowerCase().replace(/~*$/, '-');
}
FUTURE UPDATES
auth - validate_hash edge case
what if someone doesn’t activate their account (didn’t receive registration link, didn’t click) and then tries to reset their password (it will show unregistered address
auth (register, account, user-edit, forgot-reset) - enable option for password requirement rules & validation on new password fields
auth - ability to add custom groups (plugin? default options?)
dev mode utilities
// utilities for dev mode only
if ($GLOBALS['settings']['mode'] == 'development'){
$app->get('/dw/uuid[/]', function ($req, $res, $args) {
return render::text($req, $res, uniqid(uniqid()));
});
$app->get('/dw/db-structure[/]', function ($req, $res, $args) {
$tf = '';
$html = "<div style='line-height: 180%; padding: 2rem;'>";
foreach ($GLOBALS['database']->query('show tables')->fetchAll(PDO::FETCH_ASSOC) as $table){
$table_name = $table['Tables_in_' . $GLOBALS['settings']['database']['name']];
$tf .= $table_name . "\\n";
$html .= "<h1>" . $table_name . "</h1>";
$_fields = [];
foreach ($GLOBALS['database']->query('DESCRIBE ' . $table_name)->fetchAll(PDO::FETCH_ASSOC) as $field){
if ($field['Field'] != 'id'){
$_fields[] = [$field['Field'] => $field['Type']];
$tf .= ' ' . $field['Field'] . ' ' . $field['Type'] . "\\n";
$html .= '<span style="display: inline-block; width: 250px;">' . $field['Field'] . '</span> <span>' . $field['Type'] . '</span><br />';
}
}
$_tables[] = [
$table_name => $_fields
];
$tf .= "\\n";
$html .= "<br /><br />";
}
$html .= "</div>";
return render::html($req, $res, $html);
});
}
FE - form solutions wanted - find a good convenient easy way to cache fields client-side for forms with localstorage or sessionstorage, without ext dependencies (ok to write functions for dw.js, and clear fields on submit?)
Hi, I keep getting this error when I try submitting the configuration, console says internal server error on configure/execute, im trying this on a fresh ec2 instance w Debian bullseye, mysql 8.0.33 and php 8.1 (with GD). Also I ran composer install
without issues.
I also made sure www-data had permission to read/write/execute everything under the project directory.
I tried the db connection with two db users, including root.
I'm not seeing anything appear when I do tail -f error.log
for both apache and mysql.
I confirmed that my sql bind-address is set to 'localhost'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.