Coder Social home page Coder Social logo

darkwave's People

Contributors

jyoungblood avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

darkwave's Issues

misc updates 0.6.3

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)

    • org roadmap, find low-hanging fruit

dw roadmap & project cleanup

  • ?? new dw version 0.6.1 (looks like it's been started?) what's new? users stuff?

    • do we want to leave the env file out? (it's not there by default, should we leave it in the gitignore? (i added it but it's commented out))
  • 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)

    • all issues on GH, organized into roadmap/board

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']){


big ol' list of updates for 0.7 (& beyond)

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

    • allegedly you can add 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)

    • just have blank spaces in main stylesheet? (like we were doing in breakpoints.css for stereo, but in the main file?)
  • arbitrary auth groups

  • “right way” auth setup

    • app container
    • auth middleware
    • session-based auth **
      • Dw Slim session auth the right way
      • security lockout / revoke access
      • long-lived sessions (don’t want them to expire unless logging out or revoked)
    • dw auth ... is there a better way to do it than just checking the $GLOBALS['auth'] var? (better way to check than isset()?)


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

      • head request only
      • title only (can still return the same response)
  • dw forms next

    • back-end error validation / reporting

      • want to also handle any error validation on the back end & make sure there are no problems (content types, etc)
      • show errors and prevent submission/updating if there are problems
  • modals dismiss by hitting enter (er, hitting enter has the same effect as focusing the big button and clicking)

    • check that the tabs work to change selection among multiple buttons as intended
    • hitting esc works to dismiss, right?
  • 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)

      • move the 'valid' var to dw.form_valid
      • proper way to do that and still have it work correctly (/restart) whenever function is run again (need to add "was-validated" to the form?)
    • 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:

      • charset: utf8mb4
      • collation: utf8mb4_general_ci
  • 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)

  • dw - add global email templates

    • started in SME using ocean global tpl
    • docs (xu) update - you can have a layout for the html email too (er, layout param works for render::handlebars, as you might expect)
  • html email w/ hbs?

    • ?? easiest way to use hbs render to compile html to feed to the mailer?
    • like this!!
      \\\\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

    • stripped down html defaults that match the template
    • make a note in the docs "when you change the site's style you'll probably want to update the email templates, but we have a nice generic default"
  • 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

    • ?? i can't remember if i did this or not, need to do some more testing
    • related: want to do the regular js form validations without having to add the data-validate=”” attribute to the containing div (ideally we could just look up the parent container div and not have to specify ANOTHER thing)
  • dw register form - submit on enter?

    • add x-on:keydown.enter="submit()" like login form
    • add to all fields? or just the last one? (that's what i did for SME)

dw custom field validation rules

  • cool to be able to add custom checks (callback/ pass-through function) to "save" or "delete" helpers

    • you can define your own logic for validating whatever (or if you need to call something or do special checks) ... return true and the process continues, return false and the process stops (with an optional error message?)

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

  • this one uses tw, but could make a version that uses bootstrap, prob

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?)

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

      • and then if they try to create an account again? (it will show the address is already in use)
  • 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?)

    • and users edit - show different groups on different screens (like vrc)
  • dev mode utilities

    • they were useful for a little while, but not really necessary now…maybe cool to use them as plugins?
    // 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?)

feature requests / general wishlist

  • automatic skeleton screens
  • dw - "deploy to render" solution
    • recipe or whatever to do a simple install on render
    • instructions for how to work w/ this (ftp or set up your own env locally idk)
    • add a button to the readme

500 errors on configure/execute

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.

image

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'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.