Mani 62eaff6dc1 feat: Next.js 13 and React 18 (#176)
* Replaced all Reach UI components with Radix UI.
* Improved UX of playlist "Play All".
* Highlight current playing watch list item.
* Added support for hash ids.
* Added menu options for "Play Next" and "Add to Watch List".
* Made "Play Previous" button functional.
* Player buttons now have hover/focus feedback.
* Removed default controls from video element.
* Clicking the video element now toggles the playing state.
* Made the video element bigger, especially on high-res displays.
* Added "Other Entries" to new video player.
* Added support for browser media metadata to new video player.
* Switching between audio and video mode now retains the playback position.
* Removed GraphQL endpoint.
* Disabled custom scroll bar styling for touch devices.
2024-03-21 22:36:34 +01:00
2022-03-26 03:08:55 +01:00
2024-03-21 22:36:34 +01:00
2022-12-06 08:08:33 +01:00
2022-01-16 04:09:29 +01:00

AnimeThemes Web Client

  1. Configuration
  2. Development
  3. Deployment
  4. Used technologies

Configuration

To get started you need to define some environment variables. This can be done by creating a .env.local file in the root directory. A minimal setup only requires one variable to be set:

; Set this to the URL on which your local API is served.
;
; (If you do not have a local instance of animethemes-server set up
; you can also use the production or beta URLs of the AnimeThemes API.
; Keep in mind though that this puts addtional load on our servers.
; That's why it's recommended to set up your own API instance locally.)
ANIMETHEMES_API_URL=http://localhost

To get to use all features of the client, you may configure some additional variables.

This is a list of all available options:

; ===== Server-side =====

; The URL to the AnimeThemes API which will be used on the server.
ANIMETHEMES_API_URL=http://localhost

; If specified, this API key will be used to make requests to the AnimeThemes API.
; This is used to by-pass rate limiting.
ANIMETHEMES_API_KEY=...

; The token to use for manual revalidation.
REVALIDATE_TOKEN=secret

; Set to any truthy value to activate minimal build mode.
; In minimal build mode, only a small subset of pages get prerendered at build time.
MINIMAL_BUILD=true

; Set to any truthy value to activate the bundle analyzer.
ANALYZE=true

; ===== Server-side + Client-side =====

; The base path the app should be hosted on.
NEXT_PUBLIC_BASE_PATH=/wiki

; The URL to the AnimeThemes API which will be used on the browser.
NEXT_PUBLIC_API_URL=https://api.animethemes.moe

; The URL from which video files should be served.
NEXT_PUBLIC_VIDEO_URL=https://v.animethemes.moe

; The URL from which audio files should be served.
NEXT_PUBLIC_AUDIO_URL=https://a.animethemes.moe

; The URL to use for authentication API requests.
NEXT_PUBLIC_AUTH_URL=https://app.animethemes.moe

; Set to any truthy value to activate staging mode.
; In staging mode a warning banner is displayed at the top of the page.
NEXT_PUBLIC_STAGING=true

; To enable verbose logging.
NEXT_PUBLIC_VERBOSE_LOGS=true

For more information on environment variables see the Next.js documentation.

Development

  1. npm install
  2. npm run dev

Deployment

  1. npm install (If not done already.)
  2. npm run build generates all static pages and produces a production ready bundle.
  3. npm run start starts the server.
  4. The server is now listening on port 3000 for incoming requests.

Used technologies

APIs

S
Description
Languages
TypeScript 99.5%
SCSS 0.5%