Commit Graph

11 Commits

Author SHA1 Message Date
Innei
6668425fba feat: add Vite plugins for enhanced functionality and localization support
- Introduced multiple Vite plugins including `ogImagePlugin`, `feedSitemapPlugin`, `localesJsonPlugin`, and `manifestInjectPlugin` to enhance the build process and support dynamic content generation.
- Implemented a custom hot module replacement (HMR) for JSON localization files to improve development experience.
- Added a new `createDependencyChunksPlugin` for better chunk management in the build process.
- Established a structure for handling localization files and generating corresponding assets, improving internationalization support.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-27 16:58:12 +08:00
Innei
5bd5947ec2 feat: update database connection logic and enhance upsert functionality
- Refactored the database connection logic to utilize `neondatabase`, ensuring correct imports and type safety.
- Implemented atomic upsert operations in the views API, allowing for efficient insertion and updating of records using PostgreSQL's `ON CONFLICT` clause.
- Added new dependencies `ast-kit` and `unplugin-ast` for improved AST manipulation in the project.
- Enhanced the UI components with toast notifications for user feedback on reactions and improved styling with Tailwind CSS.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-27 01:19:08 +08:00
Innei
91897b6032 feat: enhance SSR and web applications with manifest injection and configuration updates
- Introduced a Vite plugin to inject the photos manifest into the HTML, enabling dynamic updates and hot reloading.
- Updated ESLint configuration to ignore build errors during SSR.
- Modified package.json scripts for concurrent development of SSR and web applications.
- Adjusted paths and imports for better module resolution and consistency across the codebase.
- Added type definitions for the global __MANIFEST__ variable to ensure type safety.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-26 22:03:04 +08:00
Innei
c58835e35b feat: enhance SSR routing and development experience
- Updated the SSR routing to conditionally load development and production handlers based on the NODE_ENV variable.
- Introduced a new dev.ts file to handle requests in development mode, including asset proxying and HTML response generation.
- Removed the not-found.tsx file and streamlined the photoId route logic for better maintainability.
- Added support for Open Graph and Twitter meta tags in the production handler for improved SEO.
- Updated README with new S3 endpoint configuration.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-23 11:31:28 +08:00
Innei
9bc692998a feat: add locales JSON transformation plugin to Vite configuration
- Introduced a new plugin for transforming JSON files in the locales directory, enhancing internationalization support.
- Updated the Vite configuration to include the new localesJsonPlugin, streamlining the handling of localization files.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-13 01:08:24 +08:00
Innei
e7ecf98c42 feat: add feed sitemap generation plugin and update site URL in config
- Introduced a new Vite plugin for generating RSS feeds and sitemaps based on photo data.
- Updated the example configuration file to reflect the new site URL format.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-12 19:48:58 +08:00
Innei
c775f82153 feat(i18n): integrate i18next for internationalization support
- Added i18next and react-i18next for multi-language support in the application.
- Created localization files for English, Japanese, Korean, Traditional Chinese, and Simplified Chinese.
- Implemented translation hooks in various components to replace hardcoded strings with translatable keys.
- Updated ESLint configuration to include new i18n JSON validation rules.
- Introduced a new event bus for handling i18n updates during development.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-12 17:56:11 +08:00
Innei
da509ed172 feat(config): introduce site configuration file and update references
- Added a new site.config.ts file to manage site configuration, merging default settings with user-defined options.
- Updated import paths in tsconfig.json files for both SSR and web applications to reference the new site.config.ts.
- Modified usage of siteConfig in route.tsx and ActionGroup.tsx to ensure compatibility with the new configuration structure.
- Removed the old site configuration export from config/site.config.ts.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-11 02:30:10 +08:00
Innei
bfeb0685ea feat(web): update HTML template and integrate vite-plugin-html for dynamic content injection
- Refactored the HTML template in `index.html` to use EJS-style placeholders for dynamic title and description.
- Added `vite-plugin-html` to the project for improved HTML handling and dynamic content injection during the build process.
- Updated `vite.config.ts` to configure the HTML plugin for minification and data injection.
- Adjusted `package.json` to include the new `vite-plugin-html` dependency.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-09 22:53:20 +08:00
Innei
238cbb71e7 feat: implement dynamic title and description in HTML template
- Updated index.html to use placeholders for title and description.
- Enhanced vite.config.ts to transform HTML and replace placeholders with site configuration values.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-05 14:28:42 +08:00
Innei
f841d2ada2 feat: init 2025-06-05 13:27:09 +08:00