diff --git a/backend/src/main/java/com/envsync/backend/BackendApplication.java b/backend/src/main/java/com/envsync/backend/BackendApplication.java index 3e8ac3d..e42e644 100644 --- a/backend/src/main/java/com/envsync/backend/BackendApplication.java +++ b/backend/src/main/java/com/envsync/backend/BackendApplication.java @@ -9,8 +9,8 @@ public class BackendApplication { public static void main(String[] args) { SpringApplication.run(BackendApplication.class, args); //call the test - test t = new test(); + test x = new test(); } diff --git a/backend/src/main/java/com/envsync/backend/SecurityConfig.java b/backend/src/main/java/com/envsync/backend/SecurityConfig.java index 2b5fda1..005103b 100644 --- a/backend/src/main/java/com/envsync/backend/SecurityConfig.java +++ b/backend/src/main/java/com/envsync/backend/SecurityConfig.java @@ -14,11 +14,10 @@ public class SecurityConfig { @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http.authorizeHttpRequests(auth -> auth - .requestMatchers("/api/secure").authenticated() - .anyRequest().permitAll() + .anyRequest().authenticated() ) .oauth2ResourceServer(oauth2 -> oauth2 - .jwt(Customizer.withDefaults()) // uses issuer-uri/jwk-set-uri + .jwt(Customizer.withDefaults()) ); return http.build(); diff --git a/cli/build.sh b/cli/build.sh deleted file mode 100755 index fea8019..0000000 --- a/cli/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -GOOS=darwin GOARCH=amd64 go build -o envsync-mac . -GOOS=windows GOARCH=amd64 go build -o envsync.exe . -GOOS=linux GOARCH=amd64 go build -o envsync-linux . \ No newline at end of file diff --git a/cli/cmd/diff.go b/cli/cmd/diff.go deleted file mode 100644 index 1ac3e0e..0000000 --- a/cli/cmd/diff.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright © 2026 NAME HERE - -*/ -package cmd - -import ( - "fmt" - - "github.com/spf13/cobra" -) - -// diffCmd represents the diff command -var diffCmd = &cobra.Command{ - Use: "diff", - Short: "A brief description of your command", - Long: `A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.`, - Run: func(cmd *cobra.Command, args []string) { - fmt.Println("diff called") - }, -} - -func init() { - rootCmd.AddCommand(diffCmd) - - // Here you will define your flags and configuration settings. - - // Cobra supports Persistent Flags which will work for this command - // and all subcommands, e.g.: - // diffCmd.PersistentFlags().String("foo", "", "A help for foo") - - // Cobra supports local flags which will only run when this command - // is called directly, e.g.: - // diffCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") -} diff --git a/cli/cmd/log.go b/cli/cmd/log.go deleted file mode 100644 index 52e7e04..0000000 --- a/cli/cmd/log.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright © 2026 NAME HERE - -*/ -package cmd - -import ( - "fmt" - - "github.com/spf13/cobra" -) - -// logCmd represents the log command -var logCmd = &cobra.Command{ - Use: "log", - Short: "A brief description of your command", - Long: `A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.`, - Run: func(cmd *cobra.Command, args []string) { - fmt.Println("log called") - }, -} - -func init() { - rootCmd.AddCommand(logCmd) - - // Here you will define your flags and configuration settings. - - // Cobra supports Persistent Flags which will work for this command - // and all subcommands, e.g.: - // logCmd.PersistentFlags().String("foo", "", "A help for foo") - - // Cobra supports local flags which will only run when this command - // is called directly, e.g.: - // logCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") -} diff --git a/cli/cmd/login.go b/cli/cmd/login.go deleted file mode 100644 index 7191740..0000000 --- a/cli/cmd/login.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright © 2026 NAME HERE - -*/ -package cmd - -import ( - "fmt" - - "github.com/spf13/cobra" -) - -// loginCmd represents the login command -var loginCmd = &cobra.Command{ - Use: "login", - Short: "A brief description of your command", - Long: `A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.`, - Run: func(cmd *cobra.Command, args []string) { - fmt.Println("login called") - }, -} - -func init() { - rootCmd.AddCommand(loginCmd) - - // Here you will define your flags and configuration settings. - - // Cobra supports Persistent Flags which will work for this command - // and all subcommands, e.g.: - // loginCmd.PersistentFlags().String("foo", "", "A help for foo") - - // Cobra supports local flags which will only run when this command - // is called directly, e.g.: - // loginCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") -} diff --git a/cli/cmd/pull.go b/cli/cmd/pull.go deleted file mode 100644 index e827301..0000000 --- a/cli/cmd/pull.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright © 2026 NAME HERE - -*/ -package cmd - -import ( - "fmt" - - "github.com/spf13/cobra" -) - -// pullCmd represents the pull command -var pullCmd = &cobra.Command{ - Use: "pull", - Short: "A brief description of your command", - Long: `A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.`, - Run: func(cmd *cobra.Command, args []string) { - fmt.Println("pull called") - }, -} - -func init() { - rootCmd.AddCommand(pullCmd) - - // Here you will define your flags and configuration settings. - - // Cobra supports Persistent Flags which will work for this command - // and all subcommands, e.g.: - // pullCmd.PersistentFlags().String("foo", "", "A help for foo") - - // Cobra supports local flags which will only run when this command - // is called directly, e.g.: - // pullCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") -} diff --git a/cli/cmd/push.go b/cli/cmd/push.go deleted file mode 100644 index 36ffefc..0000000 --- a/cli/cmd/push.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright © 2026 NAME HERE - -*/ -package cmd - -import ( - "fmt" - - "github.com/spf13/cobra" -) - -// pushCmd represents the push command -var pushCmd = &cobra.Command{ - Use: "push", - Short: "A brief description of your command", - Long: `A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.`, - Run: func(cmd *cobra.Command, args []string) { - fmt.Println("push called") - }, -} - -func init() { - rootCmd.AddCommand(pushCmd) - - // Here you will define your flags and configuration settings. - - // Cobra supports Persistent Flags which will work for this command - // and all subcommands, e.g.: - // pushCmd.PersistentFlags().String("foo", "", "A help for foo") - - // Cobra supports local flags which will only run when this command - // is called directly, e.g.: - // pushCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") -} diff --git a/cli/cmd/root.go b/cli/cmd/root.go deleted file mode 100644 index 866bd3a..0000000 --- a/cli/cmd/root.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright © 2026 NAME HERE - -*/ -package cmd - -import ( - "os" - - "github.com/spf13/cobra" -) - - - -// rootCmd represents the base command when called without any subcommands -var rootCmd = &cobra.Command{ - Use: "envsync-cli", - Short: "A brief description of your application", - Long: `A longer description that spans multiple lines and likely contains -examples and usage of using your application. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.`, - // Uncomment the following line if your bare application - // has an action associated with it: - // Run: func(cmd *cobra.Command, args []string) { }, -} - -// Execute adds all child commands to the root command and sets flags appropriately. -// This is called by main.main(). It only needs to happen once to the rootCmd. -func Execute() { - err := rootCmd.Execute() - if err != nil { - os.Exit(1) - } -} - -func init() { - // Here you will define your flags and configuration settings. - // Cobra supports persistent flags, which, if defined here, - // will be global for your application. - - // rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.envsync-cli.yaml)") - - // Cobra also supports local flags, which will only run - // when this action is called directly. - rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") -} - - diff --git a/cli/cmd/set.go b/cli/cmd/set.go deleted file mode 100644 index 557a28a..0000000 --- a/cli/cmd/set.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright © 2026 NAME HERE - -*/ -package cmd - -import ( - "fmt" - - "github.com/spf13/cobra" -) - -// setCmd represents the set command -var setCmd = &cobra.Command{ - Use: "set", - Short: "A brief description of your command", - Long: `A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.`, - Run: func(cmd *cobra.Command, args []string) { - fmt.Println("set called") - }, -} - -func init() { - rootCmd.AddCommand(setCmd) - - // Here you will define your flags and configuration settings. - - // Cobra supports Persistent Flags which will work for this command - // and all subcommands, e.g.: - // setCmd.PersistentFlags().String("foo", "", "A help for foo") - - // Cobra supports local flags which will only run when this command - // is called directly, e.g.: - // setCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") -} diff --git a/cli/cmd/unset.go b/cli/cmd/unset.go deleted file mode 100644 index 06f524d..0000000 --- a/cli/cmd/unset.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright © 2026 NAME HERE - -*/ -package cmd - -import ( - "fmt" - - "github.com/spf13/cobra" -) - -// unsetCmd represents the unset command -var unsetCmd = &cobra.Command{ - Use: "unset", - Short: "A brief description of your command", - Long: `A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.`, - Run: func(cmd *cobra.Command, args []string) { - fmt.Println("unset called") - }, -} - -func init() { - rootCmd.AddCommand(unsetCmd) - - // Here you will define your flags and configuration settings. - - // Cobra supports Persistent Flags which will work for this command - // and all subcommands, e.g.: - // unsetCmd.PersistentFlags().String("foo", "", "A help for foo") - - // Cobra supports local flags which will only run when this command - // is called directly, e.g.: - // unsetCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") -} diff --git a/cli/envsync-cli/Cargo.lock b/cli/envsync-cli/Cargo.lock new file mode 100644 index 0000000..9ac0f89 --- /dev/null +++ b/cli/envsync-cli/Cargo.lock @@ -0,0 +1,419 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "bitflags" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "clap" +version = "4.5.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "envsync-cli" +version = "0.1.0" +dependencies = [ + "clap", + "tokio", +] + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "libc" +version = "0.2.182" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tokio" +version = "1.49.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" diff --git a/cli/envsync-cli/Cargo.toml b/cli/envsync-cli/Cargo.toml new file mode 100644 index 0000000..e0c98e9 --- /dev/null +++ b/cli/envsync-cli/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "envsync-cli" +version = "0.1.0" +edition = "2024" + +[dependencies] +clap = { version = "4.5.60", features = ["derive"] } +tokio = { version = "1.49.0", features = ["full"] } diff --git a/cli/envsync-cli/src/main.rs b/cli/envsync-cli/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/cli/envsync-cli/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/cli/envsync-linux b/cli/envsync-linux deleted file mode 100755 index e608d54..0000000 Binary files a/cli/envsync-linux and /dev/null differ diff --git a/cli/envsync-mac b/cli/envsync-mac deleted file mode 100755 index 47239bb..0000000 Binary files a/cli/envsync-mac and /dev/null differ diff --git a/cli/envsync.exe b/cli/envsync.exe deleted file mode 100755 index 3e0c285..0000000 Binary files a/cli/envsync.exe and /dev/null differ diff --git a/cli/go.mod b/cli/go.mod deleted file mode 100644 index d8c3360..0000000 --- a/cli/go.mod +++ /dev/null @@ -1,37 +0,0 @@ -module github.com/geneticglitch1/envsync-cli - -go 1.25.0 - -require ( - github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect - github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect - github.com/charmbracelet/lipgloss v1.1.0 // indirect - github.com/charmbracelet/x/ansi v0.8.0 // indirect - github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect - github.com/charmbracelet/x/term v0.2.1 // indirect - github.com/fsnotify/fsnotify v1.9.0 // indirect - github.com/go-resty/resty/v2 v2.17.2 // indirect - github.com/go-viper/mapstructure/v2 v2.4.0 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/joho/godotenv v1.5.1 // indirect - github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.16 // indirect - github.com/muesli/termenv v0.16.0 // indirect - github.com/pelletier/go-toml/v2 v2.2.4 // indirect - github.com/rivo/uniseg v0.4.7 // indirect - github.com/sagikazarmark/locafero v0.11.0 // indirect - github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect - github.com/spf13/afero v1.15.0 // indirect - github.com/spf13/cast v1.10.0 // indirect - github.com/spf13/cobra v1.10.2 // indirect - github.com/spf13/pflag v1.0.10 // indirect - github.com/spf13/viper v1.21.0 // indirect - github.com/subosito/gotenv v1.6.0 // indirect - github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect - go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/crypto v0.48.0 // indirect - golang.org/x/net v0.49.0 // indirect - golang.org/x/sys v0.41.0 // indirect - golang.org/x/text v0.34.0 // indirect -) diff --git a/cli/go.sum b/cli/go.sum deleted file mode 100644 index 51eff71..0000000 --- a/cli/go.sum +++ /dev/null @@ -1,71 +0,0 @@ -github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= -github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= -github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs= -github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk= -github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY= -github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= -github.com/charmbracelet/x/ansi v0.8.0 h1:9GTq3xq9caJW8ZrBTe0LIe2fvfLR/bYXKTx2llXn7xE= -github.com/charmbracelet/x/ansi v0.8.0/go.mod h1:wdYl/ONOLHLIVmQaxbIYEC/cRKOQyjTkowiI4blgS9Q= -github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8= -github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= -github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= -github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= -github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= -github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= -github.com/go-resty/resty/v2 v2.17.2 h1:FQW5oHYcIlkCNrMD2lloGScxcHJ0gkjshV3qcQAyHQk= -github.com/go-resty/resty/v2 v2.17.2/go.mod h1:kCKZ3wWmwJaNc7S29BRtUhJwy7iqmn+2mLtQrOyQlVA= -github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= -github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= -github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= -github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= -github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= -github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= -github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= -github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= -github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= -github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= -github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= -github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= -github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= -github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= -github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= -github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= -github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= -github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= -github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= -github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= -github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= -github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= -github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= -github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= -github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= -go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= -go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= -golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= -golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= -golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= -golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= -golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= -golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= -golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/cli/internal/config/config.go b/cli/internal/config/config.go deleted file mode 100644 index e69de29..0000000 diff --git a/cli/internal/crypto/vault.go b/cli/internal/crypto/vault.go deleted file mode 100644 index e69de29..0000000 diff --git a/cli/main.go b/cli/main.go deleted file mode 100644 index 360987a..0000000 --- a/cli/main.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -Copyright © 2026 NAME HERE - -*/ -package main - -import "github.com/geneticglitch1/envsync-cli/cmd" - -func main() { - cmd.Execute() -} diff --git a/frontend/src/app/api/secure/route.ts b/frontend/src/app/api/secure/route.ts deleted file mode 100644 index 4f53b02..0000000 --- a/frontend/src/app/api/secure/route.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { getToken } from "next-auth/jwt"; -import { NextResponse } from "next/server"; -import type { NextRequest } from "next/server"; - -const BACKEND_SECURE_URL = "http://localhost:8081/api/secure"; - -export async function GET(request: NextRequest) { - const token = await getToken({ req: request, secret: process.env.NEXTAUTH_SECRET }); - - if (!token || typeof token.accessToken !== "string") { - return NextResponse.json({ error: "Not authenticated" }, { status: 401 }); - } - - const backendResponse = await fetch(BACKEND_SECURE_URL, { - headers: { - Authorization: `Bearer ${token.accessToken}`, - Accept: "application/json", - }, - cache: "no-store", - }); - - const contentType = backendResponse.headers.get("content-type") ?? ""; - - if (!backendResponse.ok) { - const body = await backendResponse.text(); - return NextResponse.json( - { - error: "Backend request failed", - status: backendResponse.status, - body, - }, - { status: 502 } - ); - } - - if (contentType.includes("application/json")) { - const data = await backendResponse.json(); - return NextResponse.json(data); - } - - const text = await backendResponse.text(); - return NextResponse.json({ data: text }); -} diff --git a/cli/LICENSE b/frontend/src/app/dashbaord/layout.tsx similarity index 100% rename from cli/LICENSE rename to frontend/src/app/dashbaord/layout.tsx diff --git a/cli/internal/api/client.go b/frontend/src/app/dashbaord/page.tsx similarity index 100% rename from cli/internal/api/client.go rename to frontend/src/app/dashbaord/page.tsx diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index a2dc41e..c4f6f88 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -1,8 +1,8 @@ @import "tailwindcss"; :root { - --background: #ffffff; - --foreground: #171717; + --background: #050505; + --foreground: #ededed; } @theme inline { @@ -10,17 +10,104 @@ --color-foreground: var(--foreground); --font-sans: var(--font-geist-sans); --font-mono: var(--font-geist-mono); -} - -@media (prefers-color-scheme: dark) { - :root { - --background: #0a0a0a; - --foreground: #ededed; - } + --color-emerald-400: #34d399; + --color-emerald-500: #10b981; + --color-emerald-600: #059669; + --color-emerald-900: #064e3b; + --color-emerald-950: #022c22; + --color-zinc-400: #a1a1aa; + --color-zinc-500: #71717a; + --color-zinc-600: #52525b; + --color-zinc-700: #3f3f46; + --color-zinc-800: #27272a; + --color-zinc-900: #18181b; + --color-zinc-950: #09090b; } body { background: var(--background); color: var(--foreground); - font-family: Arial, Helvetica, sans-serif; + font-family: var(--font-sans), system-ui, -apple-system, sans-serif; +} + +/* Glow effects */ +.glow-green { + box-shadow: 0 0 60px rgba(16, 185, 129, 0.15), 0 0 120px rgba(16, 185, 129, 0.05); +} + +.glow-green-sm { + box-shadow: 0 0 30px rgba(16, 185, 129, 0.1); +} + +/* Grid background pattern */ +.bg-grid { + background-image: + linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), + linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px); + background-size: 64px 64px; +} + +/* Gradient text */ +.text-gradient { + background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; +} + +/* Animated terminal cursor */ +@keyframes blink { + 0%, 50% { opacity: 1; } + 51%, 100% { opacity: 0; } +} +.cursor-blink { + animation: blink 1s step-end infinite; +} + +/* Fade-in on scroll (CSS-only progressive enhancement) */ +@keyframes fadeInUp { + from { + opacity: 0; + transform: translateY(20px); + } + to { + opacity: 1; + transform: translateY(0); + } +} +.animate-fade-in-up { + animation: fadeInUp 0.6s ease-out both; +} + +/* Staggered delays */ +.delay-100 { animation-delay: 0.1s; } +.delay-200 { animation-delay: 0.2s; } +.delay-300 { animation-delay: 0.3s; } +.delay-400 { animation-delay: 0.4s; } +.delay-500 { animation-delay: 0.5s; } +.delay-600 { animation-delay: 0.6s; } + +/* Scrollbar styling */ +::-webkit-scrollbar { + width: 6px; +} +::-webkit-scrollbar-track { + background: transparent; +} +::-webkit-scrollbar-thumb { + background: #27272a; + border-radius: 3px; +} +::-webkit-scrollbar-thumb:hover { + background: #3f3f46; +} + +/* Code block scrollbar */ +pre::-webkit-scrollbar { + height: 4px; +} + +/* Smooth scroll */ +html { + scroll-behavior: smooth; } diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index 6c452f3..756d6c8 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -16,8 +16,18 @@ const geistMono = Geist_Mono({ }); export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "EnvSync — Encrypted .env Collaboration for Teams", + description: + "Stop sending .env files over Slack. EnvSync is a CLI + web dashboard that gives your team a single encrypted source of truth for environment variables — with diffing, versioning, and real-time notifications. 100% self-hosted.", + keywords: [ + "environment variables", + "secrets management", + "self-hosted", + "encrypted", + "CLI", + "dotenv", + "team collaboration", + ], }; export default function RootLayout({ diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index e08f70f..c0f8f24 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -1,50 +1,565 @@ -import { getServerSession } from "next-auth"; import Link from "next/link"; -import { authOptions } from "@/lib/auth"; -import { signOut } from "next-auth/react"; +/* ------------------------------------------------------------------ */ +/* SVG Icons (inline to avoid extra deps) */ +/* ------------------------------------------------------------------ */ -export default async function Home() { - const session = await getServerSession(authOptions); +const ShieldIcon = () => ( + + + +); +const TerminalIcon = () => ( + + + +); + +const BoltIcon = () => ( + + + +); + +const ClockIcon = () => ( + + + +); + +const UsersIcon = () => ( + + + +); + +const EyeSlashIcon = () => ( + + + +); + +const DiffIcon = () => ( + + + +); + +const ServerIcon = () => ( + + + +); + +/* ------------------------------------------------------------------ */ +/* Reusable tiny components */ +/* ------------------------------------------------------------------ */ + +function Badge({ children }: { children: React.ReactNode }) { return ( -
-

EnvSync Auth Example

- -
- {session ? ( - <> -

Signed in as

-

{session.user?.email ?? session.user?.name ?? "Keycloak user"}

+ + {children} + + ); +} + +function SectionHeading({ badge, title, subtitle }: { badge: string; title: string; subtitle: string }) { + return ( +
+ {badge} +

{title}

+

{subtitle}

+
+ ); +} + +/* ------------------------------------------------------------------ */ +/* Feature cards data */ +/* ------------------------------------------------------------------ */ + +const features = [ + { + icon: , + title: "CLI-first workflow", + desc: "envsync push, pull, diff — feels like git for your .env files. Integrates into any CI/CD pipeline.", + }, + { + icon: , + title: "End-to-end encryption", + desc: "Secrets encrypted client-side with libsodium before ever hitting the server. Zero-knowledge by design.", + }, + { + icon: , + title: "Real-time notifications", + desc: "Teammates get notified instantly via Redis pub/sub the moment environment variables change.", + }, + { + icon: , + title: ".env diff viewer", + desc: "Visual diff in the web dashboard showing exactly what changed between vault versions.", + }, + { + icon: , + title: "Org & project management", + desc: "Multi-team support with role-based access control — Admin, Editor, and Viewer roles.", + }, + { + icon: , + title: "Audit log & versioning", + desc: "Full history of who changed what, when, and from where. Rollback to any previous version.", + }, + { + icon: , + title: "Zero-knowledge security", + desc: "Server only stores ciphertext. Argon2 key derivation + XChaCha20-Poly1305 encryption.", + }, + { + icon: , + title: "100% self-hosted", + desc: "Docker Compose one-liner. PostgreSQL, Redis, MinIO, Keycloak, NGINX — all on your infra.", + }, +]; + +/* ------------------------------------------------------------------ */ +/* Tech stack data */ +/* ------------------------------------------------------------------ */ + +const techStack = [ + { layer: "Frontend", tech: "Next.js 15", detail: "App Router" }, + { layer: "Backend", tech: "Spring Boot 3", detail: "Java 21" }, + { layer: "Database", tech: "PostgreSQL 16", detail: "Vaults & Audit" }, + { layer: "Cache", tech: "Redis 7", detail: "Pub/Sub" }, + { layer: "Storage", tech: "MinIO", detail: "S3-compatible" }, + { layer: "Auth", tech: "Keycloak", detail: "OIDC / SSO" }, + { layer: "Proxy", tech: "NGINX", detail: "TLS termination" }, + { layer: "Encryption", tech: "libsodium", detail: "Client-side" }, +]; + +/* ------------------------------------------------------------------ */ +/* CLI lines for the terminal animation */ +/* ------------------------------------------------------------------ */ + +const cliLines = [ + { prompt: true, text: "envsync login" }, + { prompt: false, text: "✓ Authenticated via Keycloak (SSO)" }, + { prompt: true, text: "envsync init --project my-app --env development" }, + { prompt: false, text: "✓ Vault initialized for my-app/development" }, + { prompt: true, text: "envsync push" }, + { prompt: false, text: "✓ Encrypted & pushed 12 variables to vault" }, + { prompt: true, text: "envsync diff" }, + { prompt: false, text: " + STRIPE_WEBHOOK_SECRET = ●●●●●●●●" }, + { prompt: false, text: " ~ DATABASE_URL (modified)" }, + { prompt: false, text: " - OLD_API_KEY (removed)" }, + { prompt: true, text: "envsync pull" }, + { prompt: false, text: "✓ Pulled latest vault → .env (3 changes)" }, +]; + +/* ------------------------------------------------------------------ */ +/* Architecture nodes */ +/* ------------------------------------------------------------------ */ + +const archNodes = [ + { label: "CLI Tool", sub: "push / pull / diff", color: "border-emerald-500/40 bg-emerald-500/5" }, + { label: "NGINX", sub: "Reverse Proxy · TLS", color: "border-zinc-600 bg-zinc-800/50" }, + { label: "Spring Boot API", sub: "Auth · Vault · Audit", color: "border-emerald-500/30 bg-emerald-500/5" }, + { label: "PostgreSQL", sub: "Vaults & Logs", color: "border-blue-500/30 bg-blue-500/5" }, + { label: "Redis", sub: "Pub/Sub Notifications", color: "border-red-500/30 bg-red-500/5" }, + { label: "MinIO", sub: "Encrypted Backups", color: "border-yellow-500/30 bg-yellow-500/5" }, + { label: "Keycloak", sub: "SSO · OIDC · MFA", color: "border-purple-500/30 bg-purple-500/5" }, + { label: "Next.js Dashboard", sub: "Web UI · Diff Viewer", color: "border-emerald-500/40 bg-emerald-500/5" }, +]; + +/* ================================================================== */ +/* PAGE */ +/* ================================================================== */ + +export default function LandingPage() { + return ( +
+ {/* ───── Ambient glow blobs ───── */} +
+
+
+
+
+ + {/* ═══════════════════════════════════════════════════════════ */} + {/* NAV */} + {/* ═══════════════════════════════════════════════════════════ */} + + + {/* ═══════════════════════════════════════════════════════════ */} + {/* HERO */} + {/* ═══════════════════════════════════════════════════════════ */} +
+
+ 🚧 Under Development +
+ +

+ Git for your .env files +

+ +

+ Stop sending secrets over Slack. EnvSync gives your team a single{" "} + encrypted source of truth for environment variables + — with diffing, versioning, and real-time notifications.{" "} + 100% self-hosted. +

+ +
+ + + + + Star on GitHub + + + $ npm install -g envsync-cli + +
+ + {/* Hero terminal preview */} +
+
+ + + + Terminal — envsync +
+
+ {cliLines.map((line, i) => + line.prompt ? ( +
+ ❯ + {line.text} +
+ ) : ( +
{line.text}
+ ), + )} +
+ ❯ + ▊ +
+
+
+
+ + {/* ═══════════════════════════════════════════════════════════ */} + {/* PROBLEM */} + {/* ═══════════════════════════════════════════════════════════ */} +
+
+

The Problem

+

+ Every dev team has this conversation +

+
+
+

+ @alice:{" "} + Hey did you add the new STRIPE_WEBHOOK_SECRET to your .env? +

+
+
+

+ @bob:{" "} + Wait there's a new one? Since when? +

+
+
+

+ Environment variable drift causes bugs that are impossible to reproduce, broken local setups, + and secrets leaking through Slack DMs.{" "} + EnvSync fixes this — and keeps everything on + your own infrastructure. +

+
+
+ + {/* ═══════════════════════════════════════════════════════════ */} + {/* FEATURES */} + {/* ═══════════════════════════════════════════════════════════ */} +
+ + +
+ {features.map((f, i) => ( +
+
+ {f.icon} +
+

{f.title}

+

{f.desc}

+
+ ))} +
+
+ + {/* ═══════════════════════════════════════════════════════════ */} + {/* CLI */} + {/* ═══════════════════════════════════════════════════════════ */} +
+ + +
+ {/* Left – command list */} +
+ {[ + { cmd: "envsync init --project my-app --env dev", desc: "Initialize a vault for your project" }, + { cmd: "envsync push", desc: "Encrypt & push local .env to the vault" }, + { cmd: "envsync pull", desc: "Pull latest secrets from the vault" }, + { cmd: "envsync diff", desc: "See what changed between local & remote" }, + { cmd: "envsync log", desc: "View full audit log for the vault" }, + { cmd: "envsync rollback --version 12", desc: "Restore a previous vault version" }, + { cmd: "envsync set KEY \"value\"", desc: "Set a single variable remotely" }, + { cmd: "envsync envs", desc: "List all environments" }, + ].map((item, i) => ( +
+ {item.cmd} + {item.desc} +
+ ))} +
+ + {/* Right – tall terminal */} +
+
+ + + + zsh — envsync diff +
+
+

❯ envsync diff

+

Comparing local .env ↔ vault (v14)

+
+

+ STRIPE_WEBHOOK_SECRET=whsec_●●●●●●●●

+

+ FEATURE_FLAG_V2=true

+

~ DATABASE_URL=postgres://...→...prod

+

- DEPRECATED_API_KEY

+

NEXT_PUBLIC_URL=https://app.example.com

+

REDIS_URL=redis://cache:6379

+
+

3 added · 1 modified · 1 removed · 2 unchanged

+

+ ❯ envsync pull +

+

✓ Pulled vault v14 → .env (4 changes applied)

+
+ ❯ + ▊ +
+
+
+
+
+ + {/* ═══════════════════════════════════════════════════════════ */} + {/* ARCHITECTURE */} + {/* ═══════════════════════════════════════════════════════════ */} +
+ + +
+ {archNodes.map((node, i) => ( +
+

{node.label}

+

{node.sub}

+
+ ))} +
+ + {/* Connection hint */} +
+ All services connected via Docker internal network · TLS terminated at NGINX +
+
+ + {/* ═══════════════════════════════════════════════════════════ */} + {/* TECH STACK */} + {/* ═══════════════════════════════════════════════════════════ */} +
+ + +
+ + + + + + + + + + {techStack.map((row, i) => ( + + + + + + ))} + +
LayerTechnologyDetail
{row.layer}{row.tech}{row.detail}
+
+
+ + {/* ═══════════════════════════════════════════════════════════ */} + {/* SECURITY */} + {/* ═══════════════════════════════════════════════════════════ */} +
+ + +
+ {[ + { step: "01", title: "Key derivation", desc: "Password → secret key via Argon2id (memory-hard KDF)" }, + { step: "02", title: "Client-side encrypt", desc: "XChaCha20-Poly1305 encrypts your .env before upload" }, + { step: "03", title: "Server stores ciphertext", desc: "PostgreSQL only ever sees encrypted blobs — zero knowledge" }, + { step: "04", title: "Team sharing", desc: "Vault key wrapped with each member's public key (asymmetric)" }, + ].map((s, i) => ( +
+ {s.step} +

{s.title}

+

{s.desc}

+
+ ))} +
+
+ + {/* ═══════════════════════════════════════════════════════════ */} + {/* GETTING STARTED CTA */} + {/* ═══════════════════════════════════════════════════════════ */} +
+
+

+ Ready to stop the .env chaos? +

+

+ Get up and running in under 5 minutes. Clone the repo, run Docker Compose, and your whole team + has a single encrypted source of truth. +

+ +
+
+ + + +
+
+

$ git clone https://github.com/yourusername/envsync.git

+

$ cd envsync && docker compose up -d

+

# PostgreSQL, Redis, MinIO, Keycloak, NGINX — all running ✓

+
+
+ +
+ + View on GitHub + + + + + - Sign in with Keycloak + Try the Dashboard - - )} -
+
+
+ + + {/* ═══════════════════════════════════════════════════════════ */} + {/* FOOTER */} + {/* ═══════════════════════════════════════════════════════════ */} +
+
+
+ + E + + EnvSync +
-
- - /server example - - - /client example - -
-
+
+ Features + CLI + Architecture + Security + + GitHub + +
+

+ Built to solve a real problem. No cloud required. +

+ + + ); } diff --git a/frontend/src/app/public/page.tsx b/frontend/src/app/public/page.tsx deleted file mode 100644 index 3b5acd3..0000000 --- a/frontend/src/app/public/page.tsx +++ /dev/null @@ -1,86 +0,0 @@ -"use client"; - -import { useEffect, useState } from "react"; -import Link from "next/link"; - -type PollResult = { - ok: boolean; - status: number; - body: unknown; - at: string; -}; - -export default function PublicPage() { - const [latest, setLatest] = useState(null); - const [error, setError] = useState(null); - - useEffect(() => { - let active = true; - - const run = async () => { - try { - const response = await fetch("/api/secure", { cache: "no-store" }); - const body = await response.json().catch(() => null); - - if (!active) { - return; - } - - setLatest({ - ok: response.ok, - status: response.status, - body, - at: new Date().toISOString(), - }); - setError(null); - } catch (err) { - if (!active) { - return; - } - - const message = err instanceof Error ? err.message : "Request failed"; - setError(message); - } - }; - - run(); - const interval = setInterval(run, 2000); - - return () => { - active = false; - clearInterval(interval); - }; - }, []); - - return ( -
-

/public polling example

-

- Polling /api/secure every 2 seconds. The API route forwards your access token to the backend. -

- -
- {error &&

{error}

} - {!error && !latest &&

Waiting for first response…

} - {latest && ( -
-

- Status: {latest.ok ? "success" : "failed"} ({latest.status}) -

-

Last updated: {latest.at}

-
{JSON.stringify(latest.body, null, 2)}
-
- )} -
- -
- - Home - - - Server example - -
-
- ); -} \ No newline at end of file diff --git a/frontend/src/proxy.ts b/frontend/src/proxy.ts new file mode 100644 index 0000000..e08c5de --- /dev/null +++ b/frontend/src/proxy.ts @@ -0,0 +1,11 @@ +import nextAuthMiddleware from "next-auth/middleware"; +import type { NextRequestWithAuth } from "next-auth/middleware"; +import type { NextFetchEvent } from "next/server"; + +export function proxy(request: NextRequestWithAuth, event: NextFetchEvent) { + return nextAuthMiddleware(request, event); +} + +export const config = { + matcher: ["/((?!$).*)"], +}; \ No newline at end of file