Commit Graph

33 Commits

Author SHA1 Message Date
ngoomie ada2e8337f Actually, exclude htmx from the repo
Right now htmx constitutes literally most of the
repo's code just because the current Perl code is
so small. Makes the Git repo look like it's a JS
repo, lol
2024-08-20 22:38:13 -06:00
ngoomie 185a5bb6e1 Include htmx, make some doc changes 2024-08-20 22:34:54 -06:00
ngoomie 4b4e61e474 Change subforum-related routes as per #17 2024-08-20 22:06:06 -06:00
ngoomie 88953e204e Note current apparent minimal Perl version in README.md (see #13) 2024-08-19 21:56:08 -06:00
ngoomie f10dab805a Fix bug with subforum routes
Subforum-related routes have been repositioned to the bottom of the
routes list, as putting them above other routes would make them
"override" the routes below. i.e. `/logout` would be treated as though
you were trying to view a subforum named `logout`
2024-08-19 21:41:58 -06:00
ngoomie 35e7648226 Move CharmBoard::Model::Crypt into CharmBoard::Util namespace 2024-08-19 21:37:54 -06:00
ngoomie 9c16cd0da5 Split cat/subf listing into its own Model module as per #12
I was struggling with getting the model to access my schema helper and,
I'm gonna be real with you chief, I don't even know how I managed to fix
it. But it works... I guess? lmao
2024-08-19 21:28:05 -06:00
ngoomie 3dab8cb6a0 camelCase to snake_case convert one var I missed (#5) 2024-08-19 02:48:53 -06:00
ngoomie e86434f300 Change all vars to snake_case (#5) + misc changes
- Remaining camelCase variables in `lib/CharmBoard/Controller/Register.pm` have been swapped to snake_case
- Dev/prod environment check is now case insensitive
- Change `pass_crypt => scheme` in conf to an array
2024-08-19 02:28:14 -06:00
ngoomie 1b179fb08d Stop using smartmatch (#15) and add 5.20 features (part of #13) 2024-08-19 02:13:01 -06:00
ngoomie 44eeaa80e6 Switch to imageboard-like IDs (#7) 2024-08-19 01:39:50 -06:00
ngoomie bc4f706164 Mild edit 2024-08-08 02:08:02 -06:00
ngoomie ebcaf364ac Move Crypt and Schema into Model namespace (#6) 2024-08-08 02:05:26 -06:00
ngoomie 3735c17926 Small misc. changes 2024-08-08 02:01:38 -06:00
ngoomie 83a64651c2 Issue #10 fix 2024-08-08 01:57:57 -06:00
ngoomie ff55197474 Add thread creation ability 2024-08-08 01:22:31 -06:00
ngoomie 51b2c54e9a Set up + run perltidy, plus some manual format changes too 2023-05-17 10:12:48 -06:00
ngoomie fd585edc80 Work a bit on subforum viewing/thread listing 2023-05-16 22:18:25 -06:00
ngoomie 45343a87fd Fix category and subforum listing on index + misc 2023-05-16 08:29:05 -06:00
ngoomie e12eeebb6e Merge commit 'b7c57b277b2097675c40ae71c80abf464b540668' into HEAD 2023-05-15 18:04:31 -06:00
ngoomie b7c57b277b Partial subforum listing on index, add some perlcritic stuff 2023-05-15 17:50:44 -06:00
ngoomie 4eec3f79c5 Largely just add POD doc 2023-05-13 17:49:55 -06:00
ngoomie cce6e230c9 Change VSCode specific settings 2023-05-09 00:47:20 -06:00
ngoomie dc9a42f0e6 Add logout, POD documentation, various organizational things, et al
a bunch of POD documentation was addded to various .pm files

`CharmBoard::Controller::Auth` has been split into
`CharmBoard::Controller::Register`, `CharmBoard::Controller::Login`,
and `CharmBoard::Controller:Logout` (that last one is new, too!)

`Main.pm` has been renamed to `Index.pm` like it was in the beginning

the config value `board_name` now works

`CharmBoard::Schema` namespaces were changed (`ResultSource` is now
`Source`, `ResultSet` is now `Set`)

templates were mildly reorganized

almost switched from EPL to HAML. decided I really shouldn't because I
utterly despise anything whitespace sensitive, so it doesn't matter how
compact HAML is in comparison!
2023-05-09 00:37:07 -06:00
ngoomie f0ab7713cc Finish improving Auth.pm control structure; fix other minor mistakes
both `register_do` and `login_do` in `CharmBoard::Controller::Auth` now
use two try/catch blocks instead of heavily nested if/elsif/else blocks.

I also reverted the change where I removed all of the
`use experimental 'feature-name'` declarations because, while
Mojolicious still whines about experimental features being experimental,
if you don't have `use experimental 'try'` set somewhere, then it just
does not work, unlike smartmatch which will work either way but cause
perl to get mad at you. plus, it feels weird not having those there
anyways!
2023-05-08 04:26:11 -06:00
ngoomie 07977292fe Prettify `login_do` action and remove one session per user limit
`login_do` now uses a try/catch control structure instead of the
horrifying nested if/else control structure it used before. I'd think a
failed login attempt counts as an exception, so it should be fair to use
it here?

I have also removed the one session per user limit for now. I'm going to
replace it with a manual session manager in user settings later
hopefully, and some sort of periodically run script that deletes any
expired sessions from the DB, plus maybe other places where they get
deleted.

any `use experimental 'name'` instances have been removed too since
Mojolicious complains about your use of experimental features no matter
what anyways!
2023-05-07 22:16:22 -06:00
ngoomie c4f02ec4b6 `thread_id` in `posts` table should not autoincrement 2023-05-07 19:15:24 -06:00
ngoomie e12849508e Implement login, fix more formatting 2023-05-07 08:50:39 -06:00
ngoomie c5785301ca Some prep for user sign in implementation + formatting changes
global changes:
  - config now uses snake_case instead of camelCase for config entry
    names
  - closing brackets/braces never occur on their own line
  - there are almost never spaces inside brackets/braces before and
    after the actual content
  - I also removed a bunch of linebreaks I really shouldn't have because
    it just ended up worsening readability, so I'm going to put them
    back tomorrow lol

`lib/CharmBoard.pm` :
  - removed PostgreSQL from the database driver detector, I just wanna
    stick with SQLite and MySQL initially since I'm only really familiar
    with those
  - detect dev environment (from conf file setting) and only shut
    caching off in that situation
  - removed the default layout config option

`lib/CharmBoard/Crypt/Password.pm`
  - renamed subroutines from snake_case to whateverthisiscalled
  - changed what format `passgen` outputs salts and hashes in
  - changed size and factor for reasons I honestly don't remember at
    this point. I should probably recalibrate that properly tomorrow
  - added `passchk` subroutine for verifying of passwords on the login
    screen
  - nice and helpful comments

`lib/CharmBoard/Crypt/Seasoning.pm`
  - this is what used to be `tools/pepper.pl`. it's not currently used
    for anything but it will be used for pepper generation during setup
    if CharmBoard ever gets to that point. also might use it for
    generating salts actually

`lib/CharmBoard/Controller/Auth.pm`
  - realized I had the salt and hash variable assignments the wrong way
    'round like an idiot, so I fixed that
  - added part of signup (password auth)
  - also lots of hopefully-helpful comments?

`lib/CharmBoard/Schema/*.pm`
  - added more params for each column

`lib/CharmBoard/Schema/Session.pm`
  - added `is_ip_bound` and `bound_ip` columns

`database.sql`
  - as for stuff not mentioned in the schema module changes, I added
    `ON CONFLICT` behavior (it's all `ABORT`, which rolls back the
    entire transaction)

i'm tired i'm spenfing too much time either reading about mojolicious/perl or actually programming in them (usually the former atm) i need to chillax and play some videogames
2023-05-07 00:04:15 -06:00
ngoomie 5880920e5f Forgot to commit qw format change for Schema.pm, oops 2023-05-06 00:05:47 -06:00
ngoomie 2ad959ffa8 Change schema definitions, change qw formatting
- Added `belongs_to` properties for foreign keys
- Added subforums table and restructured database around that
- `qw` formatting was changed (was `qw/ foo bar baz /` in some places, is now `qw(foo bar baz)` everywhere I think)
2023-05-06 00:02:47 -06:00
ngoomie 744c916fde Set up basic registration (but not login, yet) 2023-05-05 22:24:49 -06:00
ngoomie 7c78886191 Initial commit 2023-05-03 02:43:57 +00:00