lefthandedgoat / genit Goto Github PK
View Code? Open in Web Editor NEWA cross-platform website generator and server using F#, Suave and PostgreSQL.
License: MIT License
A cross-platform website generator and server using F#, Suave and PostgreSQL.
License: MIT License
Just make it an arg and pass it in to everything
You can enter <script>alert('hello')</script> into the text box and it will run the js when loading the view page.
Maybe add a new attribute to a page to require auth or not.
Make it use create page
For stuff like password hashing and maybe the href helpers
For many workflows (UI designers not being F# devs at all etc.) it makes more sense to have Liquid templates.
from /order/1 to /order/view/1
to clean up some of the generated code, like fake data generation, search page logic etc.
Probably related to this code
if (not (page.PageMode = Create || page.PageMode = CVEL || page.PageMode = CVELS) ) || page.Fields = [] then ""
Validation, maybe for crud apps
Contribute back to suave?
Add an DU for Postgres/SQL and generate different SQL in sql.fs
So people can know what version of the generator created their code?
Right now some of the pathing is set up to only work on OSX
xyzHelpers -> helper_xyz
Prior to releasing publicly, think of a name.
I was thinking something along the lines of 140proof which is 70% in alcohol terms because this generator can help you get 70% of the way there? Maybe 70% is too high, or alcohol references are bad.
If you create a phone number longer than that supported by the database (15 chars) you get a SQL constraint exception. This is definitely better than simply truncating the text, but it would be preferable to have a proper validation error.
Bundles for each page, so that you can just pass around all the helper functions, views and all that
hardcoding is not the answer!
let validate_required_dropdown property value =
if String.IsNullOrWhiteSpace value || value = "0"
then Some (property, sprintf "%s is required" property)
else None
Like Order/Order Items with a FK back to Order.
Not sure the best way to represent in a form, may have to add something like MVC has for model binding collections of items.
let repeat (value : string) times = if times <= 0 then "" else [1..times] |> List.map (fun _ -> value) |> List.reduce (+)
Tied to #11 Add Authentication
Pointing outside
So that there can be different schemes that password hashing is done with
Use the same method that Suave uses but store it in a file
Some places its like
get_order
others its insert_Order
Use underscore or replace with no underscore?
Generator.fs
match loginAttempt with
| Some(loginAttempt) ->
let returnPath = getQueryStringValue req "returnPath"
let returnPath = if returnPath = "" then "/" else returnPath
setAuthCookieAndRedirect id returnPath
| None -> OK <| view_login true loginForm.Email
setAuthCookieAndRedirect is passing id the function, not the user id, use the userId on loginAttempt
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.