Open Source Avalonia/.NET Project 'Aniki': Feedback and Lessons Learned
Loiuy123_ shares insights and receives technical feedback on their first significant open source project, Aniki, a MyAnimeList client built with Avalonia and .NET.
Open Source Avalonia/.NET Project ‘Aniki’: Feedback and Lessons Learned
Author: Loiuy123_
Project Overview
Loiuy123_ introduces Aniki, an open source desktop client for MyAnimeList (MAL) users, built using Avalonia (a cross-platform UI framework) and .NET. Aniki enables users to manage their MAL accounts, browse content, and even watch anime with integrated torrent search from Nyaa. The author emphasizes a commitment to ongoing development and welcomes community feedback on both coding practices and usability.
GitHub repo: TrueTheos/Aniki
Community Feedback and Recommendations
Code Quality and Modern C# Practices
- Nullable Reference Types: Strongly recommended to guard against null-related bugs. Enable this feature to improve code correctness and reliability. Learn more
- File Scoped Namespaces: Adopt C# 10’s file-scoped namespaces to reduce nesting and improve code readability. Details here
- Treat Warnings as Errors: Set
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
in your.csproj
file to ensure all warnings are addressed diligently and not ignored or suppressed. This encourages thorough code quality. - Regex Source Generators: For static or unchanging regular expressions, leverage regex source generators to optimize and validate regex usage at compile time.
- Global and Implicit Usings: Reduce repetitive code and improve project organization by utilizing global and implicit usings. Overview
Project Configuration
- Ensure
Resources\CLIENTID.txt
exists in source control, or improve documentation on how to create this file for local/self-hosted setups referencing the note in the Readme’sSelf-Hosting
section.
Branding and Usability
- Branding: Consider the name “Aniki” carefully, as it may create confusion with “Anki”, a well-known flashcard tool, particularly in overlapping communities (anime/Japanese learners). Exploring alternative names may help your project stand out.
- Screenshots & Demos: Add visual aids and demos to your repository’s README to improve usability and attract more users.
Security Considerations
- Sensitive Data Storage: Avoid storing sensitive data, such as tokens, using only base64 encoding. Implement proper encryption practices for user safety.
Encouragement and Community Spirit
- Community members congratulate Loiuy123_ for successfully bringing a useful project to life and seeking improvement. These supportive interactions foster healthy open source collaboration.
Example Security Concern
private static string EncryptData(string data) {
byte[] bytes = Encoding.UTF8.GetBytes(data);
return Convert.ToBase64String(bytes);
}
Note: Base64 is not encryption. Do not use this approach for storing sensitive data like access tokens.
Author’s Responses and Action Items
- Plans to adopt nullable reference types and enforce warnings-as-errors
- Intends to standardize use of file-scoped namespaces across the project
- Will investigate the regex source generator feature for improved pattern handling
- Committed to improving documentation and adding screenshots
- Acknowledges branding feedback and is open to renaming if needed
For more details or to contribute feedback/code, visit the GitHub repo here.
This post appeared first on “Reddit CSharp”. Read the entire article here