Skip to content

sohag47/FileForge

Repository files navigation

FileForge

Prerequisites

Database CMD

  1. Create Migration:
    Add-Migration InitialCreate
  2. Database Migrate:
Update-Database
  1. DB Connection String
Server=localhost\\SQLEXPRESS;Database=cms_backend_db;Trusted_Connection=True;TrustServerCertificate=True;
  1. Server name
.\SQLEXPRESS 

Remove Database

Drop-Database

Remove Migrations

Remove-Migration

📦 Tools & Packages

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="BCrypt.Net-Next" Version="4.1.0" />
    <PackageReference Include="FluentValidation" Version="12.1.1" />
    <PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="12.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.7" />
    <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.7" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.7" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.7">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.7" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.7">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="SharpGrip.FluentValidation.AutoValidation.Mvc" Version="2.0.0" />
    <PackageReference Include="Swashbuckle.AspNetCore" Version="10.1.7" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="Migrations\" />
  </ItemGroup>

</Project>

generate a secure key for jwt

# for Windows
[Convert]::ToBase64String((1..32 | ForEach-Object { Get-Random -Maximum 256 }))

# for Linux/macOS/Git Bash
using System.Security.Cryptography;
var key = Convert.ToBase64String(RandomNumberGenerator.GetBytes(32));
Console.WriteLine(key);

# run final command
openssl rand -base64 32

🚀 Suggested Roadmap

✅ Basic

  • Create api using app.MapGet app.MapPost app.MapPut app.MapDelete in Program.cs
  • Serve static files from wwwroot
  • Create a controller and set api end pointes
  • Implement CURD Operation
  • Bulk Create & Update
  • Image Uploads
  • Relationships OneToOne ManytoMnay OneToMany ManyToOne

✅ Mid Level

  • Add DTO for request & response
  • Add FluentValidation with DTO
  • Add Custom Error Response
  • Setup Standard and central API Response
  • Setup Service layer for implement Database Logics
  • Add AddBusinessServices to hold all the services
  • Add AddValidationConfigurations to hold all the validator rules
  • Registration, Login, Logout with JWT
  • Manage Role based authorization
  • Change Password
  • Forget Password

About

for manage file and folder

Topics

Resources

License

Stars

Watchers

Forks

Contributors