Windows Setup Guide
Complete installation and configuration guide for Windows systems
Prerequisites
Before installing AsseTrack on Windows, ensure you have the following:
- Windows 10 or Windows 11 (64-bit recommended)
- Administrator privileges on your system
- At least 4GB of RAM (8GB recommended)
- 2GB of free disk space
- Internet connection for downloading dependencies
Step 1: Install Node.js
Download Node.js
Visit the official Node.js website at https://nodejs.org
Download the LTS version (Long Term Support) which is recommended for production use.
Important
Make sure to download Node.js version 22 or higher as required by AsseTrack.
Run the Installer
Double-click the downloaded installer file (.msi)
Follow the installation wizard with these recommended settings:
- Accept the license agreement
- Choose the default installation path (usually C:\Program Files\nodejs\)
- Select "Add to PATH" option (this should be checked by default)
- Install npm package manager (included by default)
Verify Installation
Open Command Prompt or PowerShell as Administrator and run:
node --version
You should see output like: v22.x.x
Also verify npm is installed:
npm --version
Step 2: Install MySQL
Download MySQL
Visit the MySQL download page at https://dev.mysql.com/downloads/mysql/
Select "MySQL Community Server" and choose the Windows installer (mysql-installer-community-8.0.x.x.msi)
Version Compatibility
AsseTrack requires MySQL 5.7 or higher. MySQL 8.0 is recommended for better performance and security.
Install MySQL
Run the MySQL installer and follow these steps:
- Choose "Developer Default" setup type
- Install MySQL Server, MySQL Workbench, and MySQL Shell
- Configure MySQL Server with these settings:
- Set root password (remember this password!)
- Enable MySQL as a Windows service
- Set service to start automatically
- Configure Windows Firewall if prompted
Create Database
Open MySQL Workbench or Command Line Client and create a new database:
CREATE DATABASE assettrack_db;
Or using MySQL Workbench:
- Connect to your MySQL server
- Right-click in the Navigator panel
- Select "Create Schema"
- Name it "assettrack_db"
- Click "Apply"
Step 3: Install AsseTrack Server
Navigate to Server Directory
Open Command Prompt or PowerShell and navigate to the server directory:
cd "C:\path\to\assets-manager\server"
Replace the path with your actual project location.
Install Dependencies
Install all required Node.js packages:
npm install
This will install all dependencies listed in package.json including Express.js, Sequelize, JWT, and other required packages.
Create Environment File
Create a .env
file in the server directory with your configuration:
# Database Configuration
DB_HOST=localhost
DB_PORT=3306
DB_NAME=assettrack_db
DB_USERNAME=root
DB_PASSWORD=your_mysql_password
# JWT Configuration
JWT_SECRET=your-super-secure-jwt-secret-key-change-this-in-production
JWT_EXPIRES_IN=24h
# Server Configuration
PORT=3000
NODE_ENV=development
# CORS Configuration
ALLOWED_ORIGINS=http://localhost:5000,http://localhost:3000
# Rate Limiting
RATE_LIMIT_MAX=1000
AUTH_RATE_LIMIT_MAX=1000
API_RATE_LIMIT_MAX=1000
# Logging
LOG_LEVEL=info
Security Note
Change the JWT_SECRET to a strong, unique value in production. Use a password manager to generate a secure secret.
Run Database Migrations
Set up the database tables:
npm run db:migrate
This will create all necessary tables in your MySQL database.
Seed Initial Data
Add sample data to the database:
npm run db:seed
This will create default users, departments, and sample assets.
Start the Server
Start the development server:
npm run dev
You should see output indicating the server is running on port 3000.
Step 4: Install AsseTrack Client
Navigate to Client Directory
Open a new Command Prompt or PowerShell window and navigate to the client directory:
cd "C:\path\to\assets-manager\client"
Install Dependencies
Install all required packages:
npm install
This will install React, TypeScript, Tailwind CSS, and other frontend dependencies.
Configure API Endpoint
Update the API configuration in src/config/config.ts
:
export const baseUrl = "http://localhost:3000";
export const apiUrl = `${baseUrl}/api`;
Make sure the port matches your server configuration.
Start the Client
Start the development server:
npm run dev
The client will typically run on port 5000. Check the console output for the exact URL.
Step 5: Access the Application
Open your web browser and navigate to:
http://localhost:5000
Default Login Credentials
Use these credentials to log in for the first time:
- Email: admin@gmail.com
- Password: admin@123
Important
Change the default password immediately after your first login for security reasons.
Troubleshooting
Common Issues
- Port already in use: Change the port in your .env file or kill the process using that port
- MySQL connection failed: Verify MySQL is running and credentials are correct
- Permission denied: Run Command Prompt as Administrator
- Node modules not found: Ensure you're in the correct directory and run npm install
Getting Help
If you encounter issues not covered in this guide, check the Troubleshooting page for more detailed solutions.