<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Luis Alejandro Solano</title>
    <description>The latest articles on DEV Community by Luis Alejandro Solano (@luis_alejandrosolano_776).</description>
    <link>https://dev.to/luis_alejandrosolano_776</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3525100%2F81b5a170-c7bf-4540-bcb5-af02b33c5424.png</url>
      <title>DEV Community: Luis Alejandro Solano</title>
      <link>https://dev.to/luis_alejandrosolano_776</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/luis_alejandrosolano_776"/>
    <language>en</language>
    <item>
      <title>Building a Scalable and Secure Backend with .NET 9 – TechTask_API</title>
      <dc:creator>Luis Alejandro Solano</dc:creator>
      <pubDate>Thu, 09 Oct 2025 19:08:10 +0000</pubDate>
      <link>https://dev.to/luis_alejandrosolano_776/building-a-scalable-and-secure-backend-with-net-9-techtaskapi-42lk</link>
      <guid>https://dev.to/luis_alejandrosolano_776/building-a-scalable-and-secure-backend-with-net-9-techtaskapi-42lk</guid>
      <description>&lt;h1&gt;
  
  
  TechTask_API
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;TechTask_API&lt;/strong&gt; is a multi-layered backend application built with &lt;strong&gt;.NET 9 Web API&lt;/strong&gt;, designed to streamline &lt;strong&gt;project, sprint, and task management&lt;/strong&gt; for software teams.&lt;br&gt;&lt;br&gt;
This project showcases a &lt;strong&gt;clean layered architecture&lt;/strong&gt;, &lt;strong&gt;Entity Framework Core&lt;/strong&gt;, and &lt;strong&gt;JWT authentication&lt;/strong&gt;, emphasizing maintainability, scalability, and real-world business logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/alejandrosnk/TechTask_API" rel="noopener noreferrer"&gt;https://github.com/alejandrosnk/TechTask_API&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  What Is TechTask_API?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;TechTask_API&lt;/strong&gt; is part of a project management system that organizes the development process into &lt;strong&gt;Projects&lt;/strong&gt;, &lt;strong&gt;Sprints&lt;/strong&gt;, and &lt;strong&gt;Tasks&lt;/strong&gt;, with two types of users:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Project Managers (PMs)&lt;/strong&gt; – Create and manage projects, assign tasks, and track progress.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Developers (DEVs)&lt;/strong&gt; – View and update assigned tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This backend handles &lt;strong&gt;authentication&lt;/strong&gt;, &lt;strong&gt;validation&lt;/strong&gt;, and &lt;strong&gt;CRUD operations&lt;/strong&gt; while enforcing strong &lt;strong&gt;business rules&lt;/strong&gt; and &lt;strong&gt;security practices&lt;/strong&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  Architecture Overview
&lt;/h2&gt;

&lt;p&gt;The project follows a &lt;strong&gt;Clean Layered Architecture&lt;/strong&gt; divided into four independent layers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TechTask_API.sln
│
├── TechTask_API/     # Web API Layer (Controllers, Program.cs)
├── TechTask.BLL/     # Business Logic Layer (Services, Auth)
├── TechTask.Core/    # Core Definitions (DTOs, Enums)
└── TechTask.DAL/     # Data Access Layer (Entities, DbContext)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each layer is responsible for its own domain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;API:&lt;/strong&gt; Exposes endpoints via controllers.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BLL:&lt;/strong&gt; Contains business logic and validation.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Core:&lt;/strong&gt; Defines DTOs and shared structures.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DAL:&lt;/strong&gt; Uses Entity Framework Core to interact with SQL Server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This separation ensures &lt;strong&gt;modularity&lt;/strong&gt;, &lt;strong&gt;testability&lt;/strong&gt;, and &lt;strong&gt;scalability&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Authentication with JWT
&lt;/h2&gt;

&lt;p&gt;The system uses &lt;strong&gt;JSON Web Tokens (JWT)&lt;/strong&gt; to handle secure authentication.&lt;br&gt;&lt;br&gt;
Once the user logs in, a token is generated using a secret key and stored temporarily on the client side.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example JWT configuration in &lt;code&gt;appsettings.json&lt;/code&gt;
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"Jwt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"SuperSecretPrivateKey123!"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Issuer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"TechTask_API"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Audience"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"TechTask_Users"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Protected endpoints require the token in the &lt;code&gt;Authorization&lt;/code&gt; header:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Main Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;.NET 9 Web API architecture.
&lt;/li&gt;
&lt;li&gt;Entity Framework Core with SQL Server 2022.
&lt;/li&gt;
&lt;li&gt;JWT Authentication and role-based access.
&lt;/li&gt;
&lt;li&gt;BCrypt password encryption.
&lt;/li&gt;
&lt;li&gt;Swagger UI integration for live testing.
&lt;/li&gt;
&lt;li&gt;Scoped services for dependency injection.
&lt;/li&gt;
&lt;li&gt;Clean separation between API, logic, and data layers.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Business Rules Snapshot
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Module&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Users&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;PMs and DEVs, with role-based restrictions. Passwords are hashed with BCrypt.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Projects&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Created by PMs, cannot be deleted if sprints exist.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sprints&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Must belong to one project and respect date constraints.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tasks&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;May be unassigned; only DEVs can update their own task status.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Technical Highlights
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;SOLID principles applied in BLL services.
&lt;/li&gt;
&lt;li&gt;Scoped DbContext prevents concurrency issues.
&lt;/li&gt;
&lt;li&gt;DTO abstraction ensures clean and safe API responses.
&lt;/li&gt;
&lt;li&gt;Centralized business logic keeps controllers lightweight.
&lt;/li&gt;
&lt;li&gt;Swagger configuration enables secure token testing via “Authorize”.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Example Endpoint: Create Project (Protected)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;Authorize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Roles&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"PM"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;HttpPost&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IActionResult&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;Create&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;FromBody&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;ProjectCreateDTO&lt;/span&gt; &lt;span class="n"&gt;dto&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;_projectService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;CreateAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dto&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(!&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Success&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;BadRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;success&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;CreatedAtAction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;nameof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;GetById&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Data&lt;/span&gt;&lt;span class="p"&gt;!.&lt;/span&gt;&lt;span class="n"&gt;Id&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  How to Run Locally
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone repository&lt;/span&gt;
git clone https://github.com/alejandrosnk/TechTask_API.git
&lt;span class="nb"&gt;cd &lt;/span&gt;TechTask_API

&lt;span class="c"&gt;# Restore dependencies&lt;/span&gt;
dotnet restore

&lt;span class="c"&gt;# Run API&lt;/span&gt;
dotnet run &lt;span class="nt"&gt;--project&lt;/span&gt; TechTask_API
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open Swagger:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://localhost:7082/swagger
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Login to get your JWT token → click “Authorize” → paste the token → test secured endpoints.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;TechTask_API&lt;/strong&gt; demonstrates how to build a &lt;strong&gt;secure, modular, and scalable backend&lt;/strong&gt; using &lt;strong&gt;.NET 9&lt;/strong&gt;, &lt;strong&gt;EF Core&lt;/strong&gt;, and &lt;strong&gt;JWT Authentication&lt;/strong&gt; — ready for production-level scenarios.&lt;br&gt;&lt;br&gt;
Whether you are learning backend architecture or building enterprise systems, this project is a clear example of applying &lt;strong&gt;Clean Architecture&lt;/strong&gt; and &lt;strong&gt;Security Best Practices&lt;/strong&gt; in modern .NET development.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>backend</category>
      <category>jwt</category>
      <category>csharp</category>
    </item>
    <item>
      <title>Building a Rock-Paper-Scissors Simulation with JavaScript: Animation, Logic, and Persistence</title>
      <dc:creator>Luis Alejandro Solano</dc:creator>
      <pubDate>Tue, 23 Sep 2025 17:57:42 +0000</pubDate>
      <link>https://dev.to/luis_alejandrosolano_776/building-a-rock-paper-scissors-simulation-with-javascript-animation-logic-and-persistence-1o9o</link>
      <guid>https://dev.to/luis_alejandrosolano_776/building-a-rock-paper-scissors-simulation-with-javascript-animation-logic-and-persistence-1o9o</guid>
      <description>&lt;p&gt;I recently developed a project that simulates the classic game of Rock, Paper, Scissors, but with a twist. Instead of two players, entities (rock, paper, and scissors) are automatically generated and moved randomly within an arena until only one type remains. Here's the repository: &lt;a href="https://github.com/alejandrosnk/Cachipun-Automatic" rel="noopener noreferrer"&gt;https://github.com/alejandrosnk/Cachipun-Automatic&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To make it even more engaging, I added a &lt;strong&gt;betting system&lt;/strong&gt; where users can place virtual bets on the eventual winner. The system uses &lt;code&gt;localStorage&lt;/code&gt; to retain points between sessions, providing a game-like experience and demonstrating basic web development concepts.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔑 What this project demonstrates
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DOM Manipulation&lt;/strong&gt;: Dynamically managing entity creation, movement, and deletion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collision Detection&lt;/strong&gt;: Enforcing Rock, Paper, Scissors rules when entities collide.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persistence&lt;/strong&gt;: Use of &lt;code&gt;localStorage&lt;/code&gt; to manage points and bets. - &lt;strong&gt;Simulation flow&lt;/strong&gt;: From initialization → movement → battles → winner determination.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User interaction&lt;/strong&gt;: Betting controls, speed settings, and modal dialogs.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ Tech stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTML5&lt;/strong&gt; for the structure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSS3&lt;/strong&gt; for layout and animations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Basic JavaScript&lt;/strong&gt; for logic, events, and the simulation loop&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 How to run it
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Clone the repository.&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;index.html&lt;/code&gt; in your browser.&lt;/li&gt;
&lt;li&gt;Start the simulation, adjust the speed, and place your bets.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  ⚡ Future Improvements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Add simulation history&lt;/li&gt;
&lt;li&gt;More advanced entity movement&lt;/li&gt;
&lt;li&gt;Multiplayer betting system&lt;/li&gt;
&lt;li&gt;Backend integration for user profiles&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;👉 This project was a fun way to reinforce concepts of &lt;strong&gt;JavaScript animations, game logic, and client-side persistence&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;💬 I'd love community feedback on how to take this further. &lt;em&gt;What feature would you add next?&lt;/em&gt;&lt;/p&gt;




</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>gamedev</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
