Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication: Registration #6

Merged
merged 33 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8fa890d
frontend styles and pages for sign up
PizieDust Jul 2, 2024
8786773
robur.coop absolute url
PizieDust Jul 2, 2024
be6291f
load multiple images
PizieDust Jul 3, 2024
2d086e4
add robur image
PizieDust Jul 3, 2024
282cb24
add robur img
PizieDust Jul 3, 2024
71f902a
add favicon
PizieDust Jul 3, 2024
b212fbb
add password enc and uuid
PizieDust Jul 3, 2024
7d56771
favicon for index
PizieDust Jul 3, 2024
62e8c17
add favico and http request
PizieDust Jul 3, 2024
afa94be
api registration endpoint
PizieDust Jul 3, 2024
52bb41c
handle authentication
PizieDust Jul 3, 2024
b85fe1b
update styles
PizieDust Jul 3, 2024
8fe6ec8
update styles, basic client input validation
PizieDust Jul 3, 2024
6f9f9e1
Merge branch 'main' of github.com:robur-coop/mollymawk into pixie_dev
PizieDust Jul 3, 2024
197ab5a
create user records
PizieDust Jul 3, 2024
07b887c
Update user_model.ml
PizieDust Jul 3, 2024
41d1b38
Update user_model.ml
PizieDust Jul 3, 2024
3be8539
Update user_model.ml
PizieDust Jul 3, 2024
8e389ee
Update unikernel.ml
PizieDust Jul 3, 2024
42c6471
Update unikernel.ml
PizieDust Jul 3, 2024
2782599
Update user_model.ml
PizieDust Jul 3, 2024
44b440d
Update user_model.ml
PizieDust Jul 3, 2024
c128018
Update user_model.ml
PizieDust Jul 3, 2024
2df784b
Update user_model.ml
PizieDust Jul 3, 2024
c6aa4ce
Apply suggestions from code review
hannesm Jul 3, 2024
3be1046
backend and frontend validation of user input
PizieDust Jul 3, 2024
1d400c3
tokens as list
PizieDust Jul 3, 2024
f231197
Merge branch 'pixie_dev' of github.com:robur-coop/mollymawk into pixi…
PizieDust Jul 3, 2024
94c8cee
tokens list
PizieDust Jul 3, 2024
68abcdc
Update user_model.ml
PizieDust Jul 3, 2024
56735da
Update user_model.ml
PizieDust Jul 3, 2024
bc896f0
rename to value
PizieDust Jul 3, 2024
760929c
ocaml format
PizieDust Jul 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/molly_bird.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/robur.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 17 additions & 10 deletions config.ml
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
open Mirage

let data = crunch "keys"
let js = crunch "assets"
let assets = crunch "assets"

let mollymawk =
let packages =
[
package "logs" ;
package "x509" ;
package "tls-mirage" ;
package "albatross" ;
package "logs";
package "x509";
package "tls-mirage";
package "albatross";
package "yojson";
package "uri";
package "tyxml";
package "multipart_form";
package "paf" ~sublibs:[ "mirage" ] ~min:"0.5.0" ;
package "mirage-crypto-rng";
package "uuidm";
package "paf" ~sublibs:[ "mirage" ] ~min:"0.5.0";
]
and runtime_args =
[
runtime_arg ~pos:__POS__ "Unikernel.K.albatross_server";
runtime_arg ~pos:__POS__ "Unikernel.K.port";
]
in
main
~runtime_args ~packages "Unikernel.Main"
(random @-> pclock @-> mclock @-> time @-> stackv4v6 @-> kv_ro @-> kv_ro @-> job)
main ~runtime_args ~packages "Unikernel.Main"
(random @-> pclock @-> mclock @-> time @-> stackv4v6 @-> kv_ro @-> kv_ro
@-> job)

let () =
register "mollymawk"
[mollymawk $ default_random $ default_posix_clock $ default_monotonic_clock $ default_time $ generic_stackv4v6 default_network $ data $ js]
[
mollymawk $ default_random $ default_posix_clock $ default_monotonic_clock
$ default_time
$ generic_stackv4v6 default_network
$ data $ assets;
]
189 changes: 189 additions & 0 deletions footer_layout.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
open Tyxml

let footer =
Html.(
footer
~a:
[
a_class
[
"relative text-sm text-primary-50 leading-6 pb-8 pt-12 lg:pt-20 \
text-medium bg-primary-950 bg-gradient-to-br \
from-primary-900/50 via-primary-900/50 to-primary-950/50";
];
]
[
div
~a:
[
a_class
[
"container mx-auto px-4 sm:px-6 lg:px-8 pb-12 lg:pb-20 grid \
md:grid-cols-5 items-start gap-10 md:gap-16";
];
]
[
a
~a:[ a_href "/" ]
[
img
~a:[ a_class [ "md:w-24 w-16" ] ]
~src:"/images/robur.png" ~alt:"Robur.coop" ();
];
dl
[
dt
~a:
[
a_class
[
"font-bold uppercase tracking-wider text-xs \
text-white mb-3";
];
]
[ txt "Mollymawk" ];
dd
~a:[ a_class [ "font-medium flex flex-col items-start" ] ]
[
a
~a:
[
a_href "/about";
a_class [ "hover:text-primary-500 transition-colors" ];
]
[ txt "About" ];
a
~a:
[
a_href "/pricing";
a_class [ "hover:text-primary-500 transition-colors" ];
]
[ txt "Pricing" ];
a
~a:
[
a_href "https://robur.coop";
a_class [ "hover:text-primary-500 transition-colors" ];
]
[ txt "Robur.coop" ];
];
];
dl
[
dt
~a:
[
a_class
[
"font-bold uppercase tracking-wider text-xs \
text-white mb-3";
];
]
[ txt "Contact" ];
dd
~a:[ a_class [ "font-medium flex flex-col items-start" ] ]
[
a
~a:
[
a_href "/";
a_class [ "hover:text-primary-500 transition-colors" ];
]
[ txt "Docs" ];
a
~a:
[
a_href "https://mirage.io";
a_class [ "hover:text-primary-500 transition-colors" ];
]
[ txt "Mirage.io" ];
a
~a:
[
a_href "https://ocaml.org";
a_class [ "hover:text-primary-500 transition-colors" ];
]
[ txt "OCaml.org" ];
];
];
dl
[
dt
~a:
[
a_class
[
"font-bold uppercase tracking-wider text-xs \
text-white mb-3";
];
]
[ txt "Contact" ];
dd
~a:[ a_class [ "font-medium flex flex-col items-start" ] ]
[
a
~a:
[
a_href "https://github.com/robur-coop/mollymawk";
a_class [ "hover:text-primary-500 transition-colors" ];
]
[ txt "GitHub" ];
a
~a:
[
a_href "/";
a_class [ "hover:text-primary-500 transition-colors" ];
]
[ txt "Matrix.org" ];
a
~a:
[
a_href "/";
a_class [ "hover:text-primary-500 transition-colors" ];
]
[ txt "Mastodon" ];
];
];
dl
[
dt
~a:
[
a_class
[
"font-bold uppercase tracking-wider text-xs \
text-white mb-3";
];
]
[ txt "Legal" ];
dd
~a:[ a_class [ "font-medium flex flex-col items-start" ] ]
[
a
~a:
[
a_href "/";
a_class [ "hover:text-primary-500 transition-colors" ];
]
[ txt "Security" ];
a
~a:
[
a_href "/";
a_class [ "hover:text-primary-500 transition-colors" ];
]
[ txt "Privacy policy" ];
a
~a:
[
a_href "/";
a_class [ "hover:text-primary-500 transition-colors" ];
]
[ txt "Terms of service" ];
];
];
];
p
~a:[ a_class [ "text-xs text-center mb-0 mt-4" ] ]
[ txt "Copyright © 2024 Mollymawk - Powered by Albatross" ];
])
14 changes: 14 additions & 0 deletions header_layout.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
open Tyxml

let header ?(page_title="Mollymawk") ~icon () =
Html.(
head
(title (txt page_title))
[ meta ~a:[a_charset "UTF-8"] ()
; meta ~a:[a_name "viewport"; a_content "width=device-width, initial-scale=1.0"] ()
; link ~rel:[`Stylesheet] ~href:"https://unpkg.com/aos@2.3.1/dist/aos.css" ()
; link ~rel:[`Stylesheet] ~href:"style.css" ()
; script ~a:[a_src "https://kit.fontawesome.com/d1697f2fa9.js"] (txt "")
; link ~rel:[`Icon] ~href:icon ()]
)

Loading
Loading