Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Commentary

Manav Rathi86b70ec325c8
diff --git a/web/docs/dependencies.md b/web/docs/dependencies.md
index 5638facfd4..8df2ce387b 100644
--- a/web/docs/dependencies.md
+++ b/web/docs/dependencies.md
@@ -72,28 +72,31 @@ bit more exhaustively when changing the crypto layer.
### Next.js
-[Next.js](https://nextjs.org) ("next") provides the meta framework for both the
-Photos and the Auth app, and also for some of the sidecar apps like accounts and
-cast.
+[Next.js](https://nextjs.org) (package:
+[next](https://github.com/vercel/next.js)) provides the meta framework for both
+the photos and the auth app, and also for some of the sidecar apps like accounts
+and cast.
-We use a limited subset of Next. The main thing we get out of it is a reasonable
-set of defaults for bundling our app into a static export which we can then
-deploy to our webserver. In addition, the Next.js page router is convenient.
-Apart from this, while we use a few tidbits from Next.js here and there, overall
-our apps are regular React SPAs, and are not particularly tied to Next.
+We use a limited subset of Next.js. The main thing we get out of it is a
+reasonable set of defaults for bundling our app into a static export which we
+can then deploy to our webserver. In addition, the Next.js page router is
+convenient. Overall our apps can be described as regular React SPAs, and are not
+particularly tied to Next.js.
### Vite
For some of our newer code, we have started to use [Vite](https://vitejs.dev).
-It is likely the future (both generally, and for our code) since Next is
-becoming less suitable for SSR and SPAs with their push towards SSG.
+It is likely the future (both generally, and for our code) since Next.js is
+becoming less suitable for SSR and SPAs with their push towards RSC/SSG.
## UI
### React
-[React](https://react.dev) ("react") is our core framework. It also has a
-sibling "react-dom" package that renders JSX to the DOM.
+[React](https://react.dev) (package: [react](https://github.com/facebook/react))
+is our core framework. We also import its a sibling
+[react-dom](https://github.com/facebook/react) package that renders JSX to the
+DOM.
### MUI and Material Icons
@@ -108,18 +111,19 @@ We use [MUI](https://mui.com)'s
### Emotion
MUI uses [Emotion](https://emotion.sh/) (a styled-component variant) as its
-preferred CSS-in-JS library, and we use the same in our code too to reduce
-moving parts.
+preferred CSS-in-JS library, so we use the same in our code too to reduce moving
+parts.
Emotion itself comes in many parts, of which we need the following:
-- "@emotion/react" - React interface to Emotion. In particular, we set this as
- the package that handles the transformation of JSX into JS (via the
- `jsxImportSource` property in `tsconfig.json`).
+- [@emotion/react](https://github.com/emotion-js/emotion) - React interface to
+ Emotion. In particular, we set this as the package that handles the
+ transformation of JSX into JS (via the `jsxImportSource` property in
+ `tsconfig.json`).
-- "@emotion/styled" - Provides the `styled` utility, a la styled-components.
- We don't use it directly, instead we import it from `@mui/material`.
- However, MUI docs
+- [@emotion/styled](https://github.com/emotion-js/emotion) - Provides the
+ `styled` utility, a la styled-components. We don't use it directly, instead
+ we import it from `@mui/material`. However, MUI docs
[mention](https://mui.com/material-ui/integrations/interoperability/#styled-components)
that
@@ -145,14 +149,15 @@ infelicity for now.
### Translations
-For showing the app's UI in multiple languages, we use the i18next library,
-specifically its three components
+For showing the app's UI in multiple languages, we use the
+[i18next](https://www.i18next.com), specifically its three components
-- "i18next": The core `i18next` library.
-- "i18next-http-backend": Adds support for initializing `i18next` with JSON
- file containing the translation in a particular language, fetched at
- runtime.
-- "react-i18next": React specific support in `i18next`.
+- [i18next](https://github.com/i18next/i18next): The core `i18next` library.
+- [react-i18next](https://github.com/i18next/react-i18next): React specific
+ support in `i18next`.
+- [i18next-http-backend](https://github.com/i18next/i18next-http-backend):
+ Adds support for initializing `i18next` with JSON file containing the
+ translation in a particular language, fetched at runtime.
Note that inspite of the "next" in the name of the library, it has nothing to do
with Next.js.
@@ -165,7 +170,7 @@ For more details, see [translations.md](translations.md).
abstraction for dealing with form state, validation and submission states
when using React.
-## Infrastructure
+## Utilities
- [comlink](https://github.com/GoogleChromeLabs/comlink) provides a minimal
layer on top of web workers to make them more easier to use.
@@ -191,7 +196,7 @@ For more details, see [translations.md](translations.md).
- [file-type](https://github.com/sindresorhus/file-type) is used for MIME type
detection. We are at an old version 16.5.4 because v17 onwards the package
became ESM only - for our limited use case, the custom Webpack configuration
- that entails is not worth the upgrade.
+ that it'd entail is not worth the upgrade.
- [heic-convert](https://github.com/catdad-experiments/heic-convert) is used
for converting HEIC files (which browsers don't natively support) into JPEG.
@@ -232,5 +237,5 @@ For more details, see [translations.md](translations.md).
the actual OTP from the user's TOTP/HOTP secret.
- However, otpauth doesn't support steam OTPs. For these, we need to compute
- the SHA-1, and we use the same library, `jssha` that `otpauth` uses (since
- it is already part of our bundle).
+ the SHA-1, and we use the same library, `jssha` that `otpauth` uses since it
+ is already part of our bundle (transitively).