Commit graph

12 commits

Author SHA1 Message Date
Wolvan
f68ff6dbd2 Implement favicon and embbed icon
Thanks to Shydale for lending me their OC checkbox.
She a cute.
2022-02-02 22:13:07 +01:00
Wolvan
ee4e83bebc Implement MySQL table prefix
The table prefix can be used to differentiate installs on the same
MySQL database. By default, no prefix is set.
2022-01-30 17:54:18 +01:00
Wolvan
59f1c7db6e Appease crawlers and embbeders
`<meta>` tags have been added to relay information for websites trying
to pull information from the page (like discord) as well as web crawlers
to index the page.
2022-01-30 17:46:59 +01:00
Wolvan
afc7bbad01 Implement header based safety features
Using the `helmet` package, a certain set of security critical headers
are set to prevent XSS attacks and the like.
2022-01-30 16:59:11 +01:00
Wolvan
bdf5ad1b1c Fix number parsing from replacer vars 2022-01-08 17:44:39 +01:00
Wolvan
0545d90c3f Implement different backend types
Including to the previous flatfile storage, a new storage for MySQL has
been added to store polls in a database.
The amount of possible Poll Options has also been reduced to 20.
2022-01-08 16:12:04 +01:00
Wolvan
3287260962 Disable qs library
Being able to pass JSON objects in a query string is unneeded and
possibly insecure, thus should be avoided if possible.
2022-01-01 13:13:38 +01:00
Wolvan
9fa3eabad1 Make frontend js-less
The frontend should work without having JS enabled. JS will enhance the
experience but should under no circumstance be necessary.
To achieve this, the entire entry system has been turned into a form
that posts its values to a new backend path specifically made to take
form responses. Instead of returning an API response, it also redirects
the browser to either the voting page on successful creation or the
frontpage with a bunch of get parameters that are used to prefill the
form in a server-side rendering process.
An error parameter is also given but there is no way to display said
error for now.
2022-01-01 04:13:24 +01:00
Wolvan
16ca2ee8b1 Fix relative pathing issues
Running from a subdirectory makes the entire script a bit cumbersome
to wrap around when it comes to relative paths. They should now all work
properly though.
Paths that are relative to the Project Root now work as expected (eg.
package.json path) and other paths like the data and config path are
based on the current execution directory.
2021-12-29 15:25:43 +01:00
Wolvan
9d80a009ca Create rudimentary poll backend
This is currently untested, but the backend allows creating a new poll,
getting results of an existing poll, voting and retrieving info of a
poll for display purposes.
Recaptcha is not yet implemented at this stage.
2021-12-29 01:02:18 +01:00
Wolvan
1031a4c36f Implement backend and frontend loading
This system lets a server modularly load backend and frontend and allows
hosting each of the parts on separate services.
2021-12-28 23:47:30 +01:00
Wolvan
8bc3f7fe36 Initial commit
This code serves as an application framework of sorts and is totally not
stolen from some of my other projects.
2021-12-28 21:11:19 +01:00