Prerequisites
Before you begin, ensure you have the following installed:- .NET 10.0 SDK or later
- SQL Server 2019 or later (Express Edition works fine)
- Node.js 18+ and npm (for Tailwind CSS compilation)
- A code editor (Visual Studio 2022, VS Code, or Rider recommended)
- Git (for cloning the repository)
Installation
Install npm dependencies
TechCore uses Tailwind CSS for styling. Install the required npm packages:This will install:
tailwindcss(4.2.1) - Utility-first CSS framework@tailwindcss/cli(4.2.1) - Tailwind CLI toolsdaisyui(5.5.19) - Component library for Tailwind
The CSS build process runs automatically before each build via the
Tailwind MSBuild target defined in TechCore.csproj.Configure database connection
Open Connection string parameters:
appsettings.json and update the connection string to match your SQL Server instance:appsettings.json
Data Source: Your SQL Server instance (.for local,localhost, or a remote server)Database: The database name (default:TechCore)Trusted_Connection=True: Use Windows AuthenticationTrustServerCertificate=True: Accept self-signed certificates
If using SQL Server Authentication instead of Windows Authentication, replace
Trusted_Connection=True with User Id=your_username;Password=your_password.Create the database
The TechCore database should be created with the proper schema including tables, views, and triggers. If you have a SQL script, run it against your SQL Server instance:Or use SQL Server Management Studio (SSMS) to execute the schema script.The database includes:
- Core tables:
users,clientes,proveedores,productos,categoria - Transaction tables:
ventas,compras,ventasDetalle,comprasDetalle - Payment tables:
planPagos,abonosVentas - Views:
vw_CuotasPorVencer,vw_CuotasVencidas,vw_EstadoCuenta - Triggers:
TR_DisminuirStock,TR_ActualizarSaldo
Verify Entity Framework context
The application uses Entity Framework Core to interact with the database. The If you need to update the models from the database, use EF Core scaffolding:
TechCoreContext is configured in Program.cs:Program.cs
Build and run the application
Build the application using the .NET CLI:This will:The application will start on
- Restore NuGet packages (Entity Framework Core 10.0.3)
- Run the Tailwind CSS build task (
npm run css:build) - Compile the C# code
https://localhost:5001 (or the port specified in launchSettings.json).Initial setup
Once the application is running, you’ll need to set up your initial data:Create user accounts
TechCore uses a role-based access system. Theusers table structure:
Models/User.cs
Configure product categories
Create categories to organize your products:Models/Categorium.cs
- Electronics
- Office Supplies
- Furniture
- Hardware
Add customers
Register customers who will purchase from your business:Models/Cliente.cs
Register suppliers
Add suppliers for purchase order management:Models/Proveedore.cs
Create products
Add products to your inventory:Models/Producto.cs
The
Stock field updates automatically when sales are recorded via the TR_DisminuirStock database trigger on the ventasDetalle table.Making your first sale
With the initial data in place, you can now create a sales order:- Select customer: Choose from registered customers (using
Codclien) - Add products: Select products and quantities (creates
VentasDetallerecords) - Choose payment type:
CONTADO- Cash payment (full amount due immediately)- Installment - Set
Meses(payment term) andTasaInteres(interest rate)
- Calculate totals: System computes
Subtotal,Iva(tax), andTotal - Generate payment plan: If installment selected,
PlanPagorecords are created automatically - Record sale: The
Ventarecord is saved with initialSaldoequal toTotal
- Stock levels decrease when
VentasDetallerecords are inserted (viaTR_DisminuirStocktrigger) - Payment plan is generated with due dates for each installment
- Sale appears in customer’s account statement (via
vw_EstadoCuentaview)
Development workflow
Hot reload
During development, use hot reload for rapid iteration:.cs or .cshtml files.
CSS changes
When modifying Tailwind styles in your views, the CSS rebuilds automatically on next build. To manually rebuild:Database changes
If you modify the database schema:- Update the SQL Server database directly
- Re-scaffold the models to sync with code:
Troubleshooting
Connection errors
If you see database connection errors:- Verify SQL Server is running
- Check connection string in
appsettings.json - Ensure Windows Authentication is enabled (or use SQL Auth with credentials)
- Test connection using SQL Server Management Studio
CSS not loading
If styles aren’t appearing:- Run
npm installto ensure Tailwind is installed - Manually build CSS:
npm run css:build - Check that
wwwroot/css/styles.csswas generated - Clear browser cache
Port conflicts
If the default port is in use, modifyProperties/launchSettings.json:
Next steps
System requirements
Review detailed hardware and software requirements for production deployment
Database entities
Explore the data models and Entity Framework context
Core modules
Learn about customers, suppliers, products, and inventory
Development setup
Set up your development environment