A modern, responsive web application built with Blazor WebAssembly that provides quick and simple text utilities. TextHub offers a comprehensive suite of text manipulation tools including case conversion, word counting, and text formatting.
Visit the live application at: https://codefrydev.in/TextHub/
- Frontend: Blazor WebAssembly (.NET 9.0)
- Styling: Tailwind CSS
- Icons: Lucide Icons
- Deployment: GitHub Pages
- CI/CD: GitHub Actions
- .NET 9.0 SDK
- Visual Studio 2022 or VS Code with C# extension
-
Clone the repository
git clone https://github.com/yourusername/TextHub.git cd TextHub
-
Restore dependencies
dotnet restore
-
Run the application
dotnet run --project TextHub/TextHub.csproj
-
Open your browser Navigate to
https://localhost:5001
(or the URL shown in the terminal)
The application is automatically deployed to GitHub Pages using GitHub Actions. The deployment workflow:
- Builds the Blazor WebAssembly application
- Changes the base href from
/
to/TextHub/
for GitHub Pages - Creates a 404.html file for SPA fallback
- Deploys to the
gh-pages
branch
To deploy manually:
dotnet publish TextHub/TextHub.csproj -c Release -o release
# The release folder contains the deployable files
Problem: When you use /uppercase
for navigation not work as expected
Example :
=> website is hoisted on codefrydev.in/TetxHub
=> With /uppercase
it will got to codefrydev.in/uppercase
which causes issue
=> With oppercase
it will go to 'codefrydev.in/TextHub/uppercase`
Solution:
-
Fixed Navigation Links: Removed leading slashes from all tool links in
ToolDataService.cs
// Before (causing 404s) new Tool("Uppercase Converter", "Convert any text to UPPERCASE instantly", "/uppercase", "...") // After (working correctly) new Tool("Uppercase Converter", "Convert any text to UPPERCASE instantly", "uppercase", "...")
-
Fixed Navigation Bar: Updated all navigation links to use relative paths
<!-- Before --> <a href="/">Text Hub</a> <a href="/uppercase">Uppercase</a> <!-- After --> <a href="">Text Hub</a> <a href="uppercase">Uppercase</a>
-
Deployment Configuration: The deployment workflow automatically:
- Changes base href to
/TextHub/
for GitHub Pages - Creates a 404.html file for SPA fallback
- Ensures relative links resolve correctly
- Changes base href to
Problem: Tool cards and navigation links don't work after deploying to GitHub Pages.
Solution: Ensure all links use relative paths instead of absolute paths. The base href configuration in the deployment handles the rest.
- Create the Razor component in the appropriate
Features/
folder - Add the route using
@page "/tool-name"
- Update ToolDataService.cs to include the new tool
- Add the tool to the appropriate section (TextCase, TextAnalysis, or TextFormatting)
Example:
// In ToolDataService.cs
new Tool("New Tool", "Description of the new tool", "new-tool", "<svg>...</svg>")
The application uses Tailwind CSS for styling. Key customization points:
- Colors: Defined in
wwwroot/index.html
in the Tailwind config - Components: Styled using Tailwind classes
- Animations: Custom animations defined in the CSS
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Blazor for the web framework
- Tailwind CSS for styling
- Lucide Icons for beautiful icons
- GitHub Pages for hosting
If you encounter any issues or have questions, please:
- Check the Common Issues & Solutions section
- Search existing GitHub Issues
- Create a new issue if your problem isn't already documented
Made with ❤️ using Blazor WebAssembly