intial push

This commit is contained in:
Othmane Ataallah 2026-04-28 09:45:44 +01:00
parent 05924d8649
commit 7632672d65
18 changed files with 728 additions and 640 deletions

View File

@ -1,401 +0,0 @@
---
sidebar_position: 1
title: "Environment Setup Guide (TrizStock)"
description: "Complete guide to setting up the TrizStock development environment from scratch."
---
<div style={{pageBreakBefore: 'always'}}></div>
# Before You Start
Make sure you have the following before proceeding:
- **Local administrator rights** on your machine (required for most installations below)
- Access to our [Gitea instance](http://145.239.66.197:3000/).
- Your Gitea account credentials (request from your team lead if you don't have one yet)
- The application database credentials (request from your team lead — these are never stored in any repository)
# Overview of the Stack
| **Component** | **Version** | **Purpose** |
| ---------------------------- | ----------- | ------------------------------- |
| Java SE (JDK) | 8 | Runtime and compiler |
| Apache Maven | Any recent | Dependency management and build |
| Apache Tomcat | 9 | Java EE application server |
| Microsoft SQL Server | 2012 | Database engine |
| SQL Server Management Studio | Any recent | Database GUI client |
| NetBeans IDE | 17 | Development environment |
<div style={{pageBreakBefore: 'always'}}></div>
# Step 1 — Install Java SE Development Kit (JDK) 8
1. Download **JDK 8** from:
- [Gitea release assets](http://145.239.66.197:3000/othmane/team-resources/releases/tag/jdk-8u481-windows-x64)
- [Oracle's official archive](https://www.oracle.com/asean/java/technologies/javase/javase8u211-later-archive-downloads.html) if you have an account
2. Run the installer and complete the installation. Note the installation path (e.g., `C:\Program Files\Java\jdk1.8.0_xxx`).
3. Set the `JAVA_HOME` environment variable:
- Open **Start → Search → "Edit the system environment variables"**
- Click **Environment Variables**
- Under **System variables**, click **New**:
- Variable name: `JAVA_HOME`
- Variable value: `C:\Program Files\Java\jdk1.8.0_xxx` _(your actual JDK path)_
- Find the **`Path`** variable under System variables → click **Edit → New**, and add: `%JAVA_HOME%\bin`
- Click **OK** on all dialogs.
4. Open a **new** terminal window and verify:
```shell
java -version
javac -version
```
Both must return `1.8.x`. If `javac` is not found, `JAVA_HOME` or `PATH` was not set correctly.
<div style={{pageBreakBefore: 'always'}}></div>
# Step 2 — Install Apache Maven
1. Download Maven from: _(Download the **binary zip archive**)_
- [Gitea release assets](http://145.239.66.197:3000/othmane/team-resources/releases/tag/apache-maven-3.9.15-bin)
- [Apache](https://maven.apache.org/download.cgi)
2. Extract it to a stable path with no spaces (e.g., `C:\dev\maven`).
3. Set environment variables:
- Create a new system variable:
- Variable name: `MAVEN_HOME`
- Variable value: `C:\dev\maven` _(your extraction path)_
- Add `%MAVEN_HOME%\bin` to the **`Path`** system variable (same way as Step 1).
4. Open a **new** terminal and verify:
```shell
mvn -version
```
It should display the Maven version and confirm it is using your JDK 8.
<div style={{pageBreakBefore: 'always'}}></div>
# Step 3 — Configure Maven for the Private Gitea Registry
The TrizStock project has several legacy dependencies that are not available on Maven Central. They are hosted on the team's private Maven registry in Gitea. Without this configuration, your build will fail to resolve those dependencies.
1. Navigate to the Maven user settings file. If it does not exist, create it:
```URI
C:\Users\YOUR_WINDOWS_USERNAME\.m2\settings.xml
```
2. Download the `settings.xml.template` from the team [resources repository](http://145.239.66.197:3000/othmane/team-resources/src/branch/main/_global/maven/settings.xml.template).
3. Copy the template content into your `settings.xml` and replace the placeholders with your actual Gitea credentials:
```XML
<settings>
<servers>
<server>
<id>gitea</id>
<username>othmane</username>
<password>54465f0ce0fec1a357eb7d9f7055e3df873db114</password>
</server>
</servers>
</settings>
```
Verify the registry is accessible by running the following in a terminal (once you have the project cloned — see Step 7):
```shell
mvn dependency:resolve
```
All dependencies, including the legacy ones, should resolve without errors.
<div style={{pageBreakBefore: 'always'}}></div>
# Step 4 — Install Apache Tomcat 9
1. Download **Tomcat 9** (zip distribution — do **not** use the Windows installer):
- [Gitea release assets](http://145.239.66.197:3000/othmane/team-resources/releases/tag/apache-tomcat-9.0.117)
- [Apache](https://tomcat.apache.org/download-90.cgi)
2. Extract it to a stable path with no spaces (e.g., `C:\dev\tomcat9`).
3. **Do not add Tomcat to your system PATH.** NetBeans will manage it directly and only needs to know the directory.
> 📝 **Note — Tomcat is not installed as a Windows service in this setup.**
>
> Using the zip distribution means Tomcat is managed entirely by NetBeans during development — it starts and stops automatically when you run or stop your project from the IDE. It does not run in the background, does not appear in `services.msc`, and does not start with Windows. This is intentional for a development environment.
>
> If you ever need to run Tomcat outside of NetBeans (e.g., for a manual deployment or testing), you can start it directly by running `C:\dev\tomcat9\bin\startup.bat` from a terminal, and stop it with `shutdown.bat`. You can also register it as a Windows service separately if needed — ask your team lead.
<div style={{pageBreakBefore: 'always'}}></div>
# Step 5 — Install Microsoft SQL Server 2012 and SSMS
## 5.1 — Install SQL Server 2012
1. Obtain the SQL Server 2012 installer (`SQLEXPR_x64_ENU.exe`) from:
- [Gitea release assets](http://145.239.66.197:3000/othmane/team-resources/releases/tag/SQLEXPR_x64_ENU)
- [Microsoft](https://www.microsoft.com/en-us/download/details.aspx?id=56042)
2. Run the installer and choose **New SQL Server stand-alone installation**.
3. On the **"Database Engine Configuration"** screen, under **Authentication Mode**, select **Mixed Mode** (SQL Server Authentication and Windows Authentication).
4. Set the **SA account password** when prompted. Use the team standard password: `Root123456`.
5. Complete the installation.
## 5.2 — Enable TCP/IP and Port 1433
SQL Server disables TCP/IP by default on fresh installations. The application needs it to connect.
1. Open **SQL Server Configuration Manager** (search for it in the Start menu).
2. Expand **SQL Server Network Configuration → Protocols for MSSQLSERVER**.
3. Right-click **TCP/IP****Enable**.
4. Double-click **TCP/IP** → go to the **IP Addresses** tab → scroll to **IPAll** → set **TCP Port** to `1433`.
5. Click **OK**.
## 5.3 — Enable the SQL Server Browser Service
1. In **SQL Server Configuration Manager**, go to **SQL Server Services**.
2. Right-click **SQL Server Browser****Properties****Service** tab → set **Start Mode** to **Automatic**.
3. Right-click **SQL Server Browser****Start**.
## 5.4 — Restart the SQL Server Service
1. In **SQL Server Services**, right-click **SQL Server (MSSQLSERVER)****Restart**.
## 5.5 — Configure the Windows Firewall
1. Open **Windows Defender Firewall with Advanced Security** (search in Start menu).
2. Click **Inbound Rules → New Rule**.
3. Select **Port → TCP → Specific local ports: `1433`**.
4. Select **Allow the connection**.
5. Apply to all profiles (Domain, Private, Public).
6. Name the rule `SQL Server 1433` and click **Finish**.
## 5.6 — Create the Application Database Login
1. Install **SQL Server Management Studio (SSMS)**. Download from [Microsoft](https://aka.ms/ssmsfullsetup).
2. Open SSMS and connect to your local instance:
- Server name: `localhost`
- Authentication: **SQL Server Authentication**
- Login: `sa`
- Password: `Root123456`
> 📝 **Note — Check your `database.properties` before proceeding.**
>
> Open your `database.properties` file and check the value of `db.username`.
> - If it is **`sa`**, skip steps 39 entirely. The `sa` account already exists and was configured with the correct password (`Root123456`) during installation. No new login needs to be created.
> - If it is **any other username**, continue with steps 39 below to create that login.
3. In **Object Explorer**, expand **Security → Logins**.
4. Right-click **Logins → New Login**.
5. Set the login name and password to match what is in `database.properties` (provided by your team lead).
6. On the **General** page, make sure **Login** status at the bottom is set to **Enabled** (this is the default, but confirm it is not set to Disabled).
7. On the **Status** page, under **Login**, confirm it is set to **Enabled** and under **Permission to connect to database engine**, confirm it is set to **Grant**.
8. On the **Server Roles** page, check **`dbcreator`** and **`public`**.
9. Click **OK**.
<div style={{pageBreakBefore: 'always'}}></div>
# Step 6 — Restore the Test Database
1. Download the Stock project test database backup file from the [Gitea release assets](http://145.239.66.197:3000/othmane/team-resources/releases/tag/life_07-04-2026).
2. Open **SSMS** and connect to your local SQL Server instance.
3. In **Object Explorer**, right-click **Databases → Restore Database…**
4. Select **Device** as the source, click **…** (Browse), then click **Add** and navigate to the downloaded `.bak` file. Click **OK**.
5. The backup details will populate in the **Backup sets to restore** grid. Confirm the correct entry is checked.
6. Click **OK** to restore. A success dialog will appear when complete.
7. In **Object Explorer**, right-click **Databases → Refresh**. The `TrizStockLife` database should now appear.
8. Verify the application login created in Step 5.6 has access:
- Expand **TrizStockLife → Security → Users**
- If your application login is not listed, right-click **Users → New User**, and map the login to this database with the **`db_owner`** role.
<div style={{pageBreakBefore: 'always'}}></div>
# Step 7 — Install and Configure Git
## 7.1 — Install Git
1. Install **Git** if not already installed. [Download from here](https://git-scm.com/download/win).
2. Run the installer. When prompted for the default editor, choose whichever you are comfortable with (Notepad is fine for occasional use).
3. On the **"Adjusting your PATH environment"** screen, select **"Git from the command line and also from 3rd-party software"** — this makes Git available in CMD, PowerShell, and Cygwin.
4. Complete the rest of the installation with default settings.
5. Verify the installation by opening a **new** terminal and running:
```Shell
git --version
```
## 7.2 — Configure Your Identity
Git requires a name and email to be set before you can make any commit. These are embedded in every commit you create and must match your Gitea identity.
```Shell
git config --global user.name "Your Full Name"
git config --global user.email "your.email@company.com"
```
> Use the same email address as your Gitea account.
## 7.3 — Configure Line Endings
This is a **critical setting** for the team. Incorrect line ending configuration causes unnecessary diffs, pollutes commit history, and can break file parsing on the server side.
Run the following commands exactly as written:
```Shell
git config --global core.autocrlf false
git config --global core.eol lf
```
| Setting | Value | Reason |
| --------------- | ------- | --------------------------------------------------------------------------------------------------------------------------- |
| `core.autocrlf` | `false` | Disables automatic line ending conversion. Git will not touch line endings on checkout or commit. |
| `core.eol` | `lf` | Enforces LF (`\n`) as the line ending for all files in the working tree, consistent with the server and Linux environments. |
> ⚠️ **Do not skip this step.** If `autocrlf` is left at its Windows default of `true`, Git will silently convert all line endings to CRLF on checkout and back to LF on commit. This causes every file to appear modified on Windows even when no real changes were made.
## 7.4 — Configure Default Branch Name
The team uses `master` as the default branch name. Set this to avoid a mismatch when creating new local branches:
```Shell
git config --global init.defaultBranch master
```
## 7.5 — Verify Your Configuration
Run the following to confirm all settings were applied correctly:
```Shell
git config --global --list
```
You should see at minimum:
```Shell
user.name=Your Full Name
user.email=your.email@company.com
core.autocrlf=false
core.eol=lf
init.defaultbranch=master
```
<div style={{pageBreakBefore: 'always'}}></div>
# Step 8 — Clone the Project Repository
1. Open a terminal and clone the Stock repository:
```Shell
git clone http://145.239.66.197:3000/TrizTech/TrizStockRepository.git
```
2. When prompted, enter your Gitea username and password (or token if your Gitea instance requires it).
3. Navigate into the project folder:
```Shell
cd TrizStockRepository
```
<div style={{pageBreakBefore: 'always'}}></div>
# Step 9 — Configure `database.properties`
The `database.properties` file contains the local database connection settings. It is **never stored in the repository** for security reasons. You need to create it manually.
1. Download the template from the [team resources repository](http://145.239.66.197:3000/othmane/team-resources/src/branch/main/uses/stock).
2. Copy the template into the correct location inside your local repository:
```URI
\src\main\resources\database.properties
```
3. Open the file in any text editor and fill in your local values:
```properties
db.host=localhost
db.port=1433
db.name=TrizStockLife
db.username=YOUR_DB_USERNAME
db.password=YOUR_DB_PASSWORD
```
4. Verify that `database.properties` is listed in the project's `.gitignore`:
```gitignore
# In the project root, open .gitignore and confirm this line exists:
database.properties
```
If it is not there, add it. **Never commit this file.**
<div style={{pageBreakBefore: 'always'}}></div>
# Step 10 — Install and Configure NetBeans 17
## 10.1 — Install NetBeans
1. Download **NetBeans 17** from:
- [Gitea release assets](http://145.239.66.197:3000/othmane/team-resources/releases/tag/Apache-NetBeans-17-bin-windows-x64)
- [Apache](https://netbeans.apache.org/front/main/download/nb17/)
2. Run the installer and complete the installation with default settings.
## 10.2 — Register JDK 8
NetBeans may detect a newer JDK if you have one installed. Ensure it is using JDK 8 for this project.
1. Open NetBeans → **Tools → Java Platforms**.
2. Check that **JDK 1.8** is listed. If not, click **Add Platform**, select **Java Standard Edition**, and navigate to your JDK 8 installation directory (your `JAVA_HOME` path).
3. Click **Finish**, then **Close**.
## 10.3 — Register Tomcat 9
1. Go to **Tools → Servers → Add Server**.
2. Select **Apache Tomcat or TomEE** and click **Next**.
3. Set the **Server Location** to your Tomcat 9 directory (e.g., `C:\dev\tomcat9`).
4. Set a username and password for the Tomcat manager (you can use any values for local development, e.g., `admin` / `admin`).
5. Click **Finish**.
## 10.4 — Configure Maven in NetBeans
1. Go to **Tools → Options → Java → Maven**.
2. Under **Maven Home**, click **Browse** and point it to your Maven installation directory (`C:\dev\maven`). Do not use the **"Bundled"** option.
3. Click **OK**.
## 10.5 — Open the Project
1. Go to **File → Open Project**.
2. Navigate to your cloned `stock` folder and select it. NetBeans will recognize it as a Maven project.
3. Click **Open Project**.
<div style={{pageBreakBefore: 'always'}}></div>
# Step 11 — Build and Verify
This final step confirms that your entire environment is wired up correctly.
## 11.1 — Build the Project
1. In NetBeans, right-click the **Stock** project in the Projects panel.
2. Select **Clean and Build**.
3. Monitor the **Output** panel at the bottom. The build must end with:
```Log
BUILD SUCCESS
```
If you see `BUILD FAILURE` with dependency errors, revisit Step 3 (Maven settings.xml and Gitea registry).
## 11.2 — Deploy and Run
1. Right-click the project → **Run**.
2. NetBeans will deploy the application to your local Tomcat 9 instance and open it in the browser.
3. The application should load without any database connection errors.
## 11.3 — Verify Database Connectivity
1. Log in to the application using the test credentials (ask your team lead for the default test user).
2. Navigate to any section that loads data from the database (e.g., the stock listing page).
3. If data loads correctly, your environment is fully operational.
<div style={{pageBreakBefore: 'always'}}></div>
# Troubleshooting
| **Symptom** | **Likely Cause** | **Fix** |
| ------------------------------------------------ | ----------------------------------------------------------------- | ---------------------------------------------------------------- |
| `java -version` shows wrong version or not found | `JAVA_HOME` or `PATH` not set correctly | Revisit Step 1, open a **new** terminal after changes |
| `javac` not found | JRE installed instead of JDK | Reinstall using the JDK download |
| `mvn -version` not found | `mvn -version` not found | Revisit Step 2 |
| Maven build fails with dependency not found | `settings.xml` not configured or wrong credentials | Revisit Step 3 |
| Cannot connect to SQL Server from SSMS | TCP/IP disabled or port 1433 blocked | Revisit Steps 5.2 and 5.5 |
| Application fails to connect to DB at runtime | Wrong credentials in `database.properties`, or TCP/IP not enabled | Revisit Steps 5.2 and 9 |
| `database.properties` not found at runtime | File placed in wrong directory | Confirm the file is at `\src\main\resources\database.properties` |
| Tomcat not found in NetBeans | Server not registered | Revisit Step 10.3 |
| NetBeans using wrong JDK | JDK 8 not registered as a Java Platform | Revisit Step 10.2 |
| Build succeeds but app doesn't start | Tomcat configuration issue | Check the NetBeans Output panel for the full stack trace |
<div style={{pageBreakBefore: 'always'}}></div>
# Reference Links
| **Resource** | **URL** |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------- |
| Team Resources Repository | [LINK](http://145.239.66.197:3000/othmane/team-resources) |
| Stock Project Repository | [LINK](http://145.239.66.197:3000/TrizTech/TrizStockRepository) |
| Stock Database Release Assets | [LINK](http://145.239.66.197:3000/othmane/team-resources/releases/tag/life_07-04-2026) |
| Gitea Maven Registry | [LINK](http://145.239.66.197:3000/othmane/-/packages/) |
| `database.properties` Template | [LINK](http://145.239.66.197:3000/othmane/team-resources/src/branch/main/uses/stock/database.properties) |
| `settings.xml` Template | [LINK](http://145.239.66.197:3000/othmane/team-resources/src/branch/main/_global/maven/settings.xml.template) |

View File

@ -0,0 +1,87 @@
---
sidebar_position: 2
title: "Java and Maven"
---
# Java and Maven
---
# Step 1 — Install Java SE Development Kit (JDK) 8
1. Download **JDK 8** from:
- [Gitea release assets](http://145.239.66.197:3000/othmane/team-resources/releases/tag/jdk-8u481-windows-x64)
- [Oracle's official archive](https://www.oracle.com/asean/java/technologies/javase/javase8u211-later-archive-downloads.html) if you have an account
2. Run the installer and complete the installation. Note the installation path (e.g., `C:\Program Files\Java\jdk1.8.0_xxx`).
3. Set the `JAVA_HOME` environment variable:
- Open **Start → Search → "Edit the system environment variables"**
- Click **Environment Variables**
- Under **System variables**, click **New**:
- Variable name: `JAVA_HOME`
- Variable value: `C:\Program Files\Java\jdk1.8.0_xxx` _(your actual JDK path)_
- Find the **`Path`** variable under System variables → click **Edit → New**, and add: `%JAVA_HOME%\bin`
- Click **OK** on all dialogs.
4. Open a **new** terminal window and verify:
```bash
java -version
javac -version
```
Both must return `1.8.x`. If `javac` is not found, `JAVA_HOME` or `PATH` was not set correctly.
---
# Step 2 — Install Apache Maven
1. Download Maven from: _(Download the **binary zip archive**)_
- [Gitea release assets](http://145.239.66.197:3000/othmane/team-resources/releases/tag/apache-maven-3.9.15-bin)
- [Apache](https://maven.apache.org/download.cgi)
2. Extract it to a stable path with no spaces (e.g., `C:\dev\maven`).
3. Set environment variables:
- Create a new system variable:
- Variable name: `MAVEN_HOME`
- Variable value: `C:\dev\maven` _(your extraction path)_
- Add `%MAVEN_HOME%\bin` to the **`Path`** system variable (same way as Step 1).
4. Open a **new** terminal and verify:
```bash
mvn -version
```
It should display the Maven version and confirm it is using your JDK 8.
---
# Step 3 — Configure Maven for the Private Gitea Registry
The TrizStock project has several legacy dependencies that are not available on Maven Central. They are hosted on the team's private Maven registry in Gitea. Without this configuration, your build will fail to resolve those dependencies.
1. Navigate to the Maven user settings file. If it does not exist, create it:
```text
C:\Users\YOUR_WINDOWS_USERNAME\.m2\settings.xml
```
2. Download the `settings.xml.template` from the team [resources repository](http://145.239.66.197:3000/othmane/team-resources/src/branch/main/_global/maven/settings.xml.template).
3. Copy the template content into your `settings.xml` and replace the placeholders with your actual Gitea credentials:
```xml
<settings>
<servers>
<server>
<id>gitea</id>
<username>othmane</username>
<password>54465f0ce0fec1a357eb7d9f7055e3df873db114</password>
</server>
</servers>
</settings>
```
Verify the registry is accessible by running the following in a terminal (once you have the project cloned — see Step 7):
```bash
mvn dependency:resolve
```
All dependencies, including the legacy ones, should resolve without errors.

View File

@ -0,0 +1,22 @@
---
sidebar_position: 3
title: "Tomcat Server"
---
# Tomcat Server
---
# Step 4 — Install Apache Tomcat 9
1. Download **Tomcat 9** (zip distribution — do **not** use the Windows installer):
- [Gitea release assets](http://145.239.66.197:3000/othmane/team-resources/releases/tag/apache-tomcat-9.0.117)
- [Apache](https://tomcat.apache.org/download-90.cgi)
2. Extract it to a stable path with no spaces (e.g., `C:\dev\tomcat9`).
3. **Do not add Tomcat to your system PATH.** NetBeans will manage it directly and only needs to know the directory.
> 📝 **Note — Tomcat is not installed as a Windows service in this setup.**
>
> Using the zip distribution means Tomcat is managed entirely by NetBeans during development — it starts and stops automatically when you run or stop your project from the IDE. It does not run in the background, does not appear in `services.msc`, and does not start with Windows. This is intentional for a development environment.
>
> If you ever need to run Tomcat outside of NetBeans (e.g., for a manual deployment or testing), you can start it directly by running `C:\dev\tomcat9\bin\startup.bat` from a terminal, and stop it with `shutdown.bat`. You can also register it as a Windows service separately if needed — ask your team lead.

View File

@ -0,0 +1,87 @@
---
sidebar_position: 4
title: "Database Setup"
---
# Database Setup
---
# Step 5 — Install Microsoft SQL Server 2012 and SSMS
## 5.1 — Install SQL Server 2012
1. Obtain the SQL Server 2012 installer (`SQLEXPR_x64_ENU.exe`) from:
- [Gitea release assets](http://145.239.66.197:3000/othmane/team-resources/releases/tag/SQLEXPR_x64_ENU)
- [Microsoft](https://www.microsoft.com/en-us/download/details.aspx?id=56042)
2. Run the installer and choose **New SQL Server stand-alone installation**.
3. On the **"Database Engine Configuration"** screen, under **Authentication Mode**, select **Mixed Mode** (SQL Server Authentication and Windows Authentication).
4. Set the **SA account password** when prompted. Use the team standard password: `Root123456`.
5. Complete the installation.
## 5.2 — Enable TCP/IP and Port 1433
SQL Server disables TCP/IP by default on fresh installations. The application needs it to connect.
1. Open **SQL Server Configuration Manager** (search for it in the Start menu).
2. Expand **SQL Server Network Configuration → Protocols for MSSQLSERVER**.
3. Right-click **TCP/IP****Enable**.
4. Double-click **TCP/IP** → go to the **IP Addresses** tab → scroll to **IPAll** → set **TCP Port** to `1433`.
5. Click **OK**.
## 5.3 — Enable the SQL Server Browser Service
1. In **SQL Server Configuration Manager**, go to **SQL Server Services**.
2. Right-click **SQL Server Browser****Properties****Service** tab → set **Start Mode** to **Automatic**.
3. Right-click **SQL Server Browser****Start**.
## 5.4 — Restart the SQL Server Service
1. In **SQL Server Services**, right-click **SQL Server (MSSQLSERVER)****Restart**.
## 5.5 — Configure the Windows Firewall
1. Open **Windows Defender Firewall with Advanced Security** (search in Start menu).
2. Click **Inbound Rules → New Rule**.
3. Select **Port → TCP → Specific local ports: `1433`**.
4. Select **Allow the connection**.
5. Apply to all profiles (Domain, Private, Public).
6. Name the rule `SQL Server 1433` and click **Finish**.
## 5.6 — Create the Application Database Login
1. Install **SQL Server Management Studio (SSMS)**. Download from [Microsoft](https://aka.ms/ssmsfullsetup).
2. Open SSMS and connect to your local instance:
- Server name: `localhost`
- Authentication: **SQL Server Authentication**
- Login: `sa`
- Password: `Root123456`
> 📝 **Note — Check your `database.properties` before proceeding.**
>
> Open your `database.properties` file and check the value of `db.username`.
> - If it is **`sa`**, skip steps 39 entirely. The `sa` account already exists and was configured with the correct password (`Root123456`) during installation. No new login needs to be created.
> - If it is **any other username**, continue with steps 39 below to create that login.
3. In **Object Explorer**, expand **Security → Logins**.
4. Right-click **Logins → New Login**.
5. Set the login name and password to match what is in `database.properties` (provided by your team lead).
6. On the **General** page, make sure **Login** status at the bottom is set to **Enabled** (this is the default, but confirm it is not set to Disabled).
7. On the **Status** page, under **Login**, confirm it is set to **Enabled** and under **Permission to connect to database engine**, confirm it is set to **Grant**.
8. On the **Server Roles** page, check **`dbcreator`** and **`public`**.
9. Click **OK**.
---
# Step 6 — Restore the Test Database
1. Download the Stock project test database backup file from the [Gitea release assets](http://145.239.66.197:3000/othmane/team-resources/releases/tag/life_07-04-2026).
2. Open **SSMS** and connect to your local SQL Server instance.
3. In **Object Explorer**, right-click **Databases → Restore Database…**
4. Select **Device** as the source, click **…** (Browse), then click **Add** and navigate to the downloaded `.bak` file. Click **OK**.
5. The backup details will populate in the **Backup sets to restore** grid. Confirm the correct entry is checked.
6. Click **OK** to restore. A success dialog will appear when complete.
7. In **Object Explorer**, right-click **Databases → Refresh**. The `TrizStockLife` database should now appear.
8. Verify the application login created in Step 5.6 has access:
- Expand **TrizStockLife → Security → Users**
- If your application login is not listed, right-click **Users → New User**, and map the login to this database with the **`db_owner`** role.

View File

@ -0,0 +1,126 @@
---
sidebar_position: 5
title: "Git and Repository"
---
# Git and Repository
---
# Step 7 — Install and Configure Git
## 7.1 — Install Git
1. Install **Git** if not already installed. [Download from here](https://git-scm.com/download/win).
2. Run the installer. When prompted for the default editor, choose whichever you are comfortable with (Notepad is fine for occasional use).
3. On the **"Adjusting your PATH environment"** screen, select **"Git from the command line and also from 3rd-party software"** — this makes Git available in CMD, PowerShell, and Cygwin.
4. Complete the rest of the installation with default settings.
5. Verify the installation by opening a **new** terminal and running:
```bash
git --version
```
## 7.2 — Configure Your Identity
Git requires a name and email to be set before you can make any commit. These are embedded in every commit you create and must match your Gitea identity.
```bash
git config --global user.name "Your Full Name"
git config --global user.email "your.email@company.com"
```
> Use the same email address as your Gitea account.
## 7.3 — Configure Line Endings
This is a **critical setting** for the team. Incorrect line ending configuration causes unnecessary diffs, pollutes commit history, and can break file parsing on the server side.
Run the following commands exactly as written:
```bash
git config --global core.autocrlf false
git config --global core.eol lf
```
| Setting | Value | Reason |
| --------------- | ------- | --------------------------------------------------------------------------------------------------------------------------- |
| `core.autocrlf` | `false` | Disables automatic line ending conversion. Git will not touch line endings on checkout or commit. |
| `core.eol` | `lf` | Enforces LF (`\n`) as the line ending for all files in the working tree, consistent with the server and Linux environments. |
> ⚠️ **Do not skip this step.** If `autocrlf` is left at its Windows default of `true`, Git will silently convert all line endings to CRLF on checkout and back to LF on commit. This causes every file to appear modified on Windows even when no real changes were made.
## 7.4 — Configure Default Branch Name
The team uses `master` as the default branch name. Set this to avoid a mismatch when creating new local branches:
```bash
git config --global init.defaultBranch master
```
## 7.5 — Verify Your Configuration
Run the following to confirm all settings were applied correctly:
```bash
git config --global --list
```
You should see at minimum:
```bash
user.name=Your Full Name
user.email=your.email@company.com
core.autocrlf=false
core.eol=lf
init.defaultbranch=master
```
---
# Step 8 — Clone the Project Repository
1. Open a terminal and clone the Stock repository:
```bash
git clone http://145.239.66.197:3000/TrizTech/TrizStockRepository.git
```
2. When prompted, enter your Gitea username and password (or token if your Gitea instance requires it).
3. Navigate into the project folder:
```bash
cd TrizStockRepository
```
---
# Step 9 — Configure `database.properties`
The `database.properties` file contains the local database connection settings. It is **never stored in the repository** for security reasons. You need to create it manually.
1. Download the template from the [team resources repository](http://145.239.66.197:3000/othmane/team-resources/src/branch/main/uses/stock).
2. Copy the template into the correct location inside your local repository:
```text
\src\main\resources\database.properties
```
3. Open the file in any text editor and fill in your local values:
```properties
db.host=localhost
db.port=1433
db.name=TrizStockLife
db.username=YOUR_DB_USERNAME
db.password=YOUR_DB_PASSWORD
```
4. Verify that `database.properties` is listed in the project's `.gitignore`:
```text
# In the project root, open .gitignore and confirm this line exists:
database.properties
```
If it is not there, add it. **Never commit this file.**

View File

@ -0,0 +1,75 @@
---
sidebar_position: 6
title: "IDE Configuration"
---
# IDE Configuration
---
# Step 10 — Install and Configure NetBeans 17
## 10.1 — Install NetBeans
1. Download **NetBeans 17** from:
- [Gitea release assets](http://145.239.66.197:3000/othmane/team-resources/releases/tag/Apache-NetBeans-17-bin-windows-x64)
- [Apache](https://netbeans.apache.org/front/main/download/nb17/)
2. Run the installer and complete the installation with default settings.
## 10.2 — Register JDK 8
NetBeans may detect a newer JDK if you have one installed. Ensure it is using JDK 8 for this project.
1. Open NetBeans → **Tools → Java Platforms**.
2. Check that **JDK 1.8** is listed. If not, click **Add Platform**, select **Java Standard Edition**, and navigate to your JDK 8 installation directory (your `JAVA_HOME` path).
3. Click **Finish**, then **Close**.
## 10.3 — Register Tomcat 9
1. Go to **Tools → Servers → Add Server**.
2. Select **Apache Tomcat or TomEE** and click **Next**.
3. Set the **Server Location** to your Tomcat 9 directory (e.g., `C:\dev\tomcat9`).
4. Set a username and password for the Tomcat manager (you can use any values for local development, e.g., `admin` / `admin`).
5. Click **Finish**.
## 10.4 — Configure Maven in NetBeans
1. Go to **Tools → Options → Java → Maven**.
2. Under **Maven Home**, click **Browse** and point it to your Maven installation directory (`C:\dev\maven`). Do not use the **"Bundled"** option.
3. Click **OK**.
## 10.5 — Open the Project
1. Go to **File → Open Project**.
2. Navigate to your cloned `stock` folder and select it. NetBeans will recognize it as a Maven project.
3. Click **Open Project**.
---
# Step 11 — Build and Verify
This final step confirms that your entire environment is wired up correctly.
## 11.1 — Build the Project
1. In NetBeans, right-click the **Stock** project in the Projects panel.
2. Select **Clean and Build**.
3. Monitor the **Output** panel at the bottom. The build must end with:
```log
BUILD SUCCESS
```
If you see `BUILD FAILURE` with dependency errors, revisit Step 3 (Maven settings.xml and Gitea registry).
## 11.2 — Deploy and Run
1. Right-click the project → **Run**.
2. NetBeans will deploy the application to your local Tomcat 9 instance and open it in the browser.
3. The application should load without any database connection errors.
## 11.3 — Verify Database Connectivity
1. Log in to the application using the test credentials (ask your team lead for the default test user).
2. Navigate to any section that loads data from the database (e.g., the stock listing page).
3. If data loads correctly, your environment is fully operational.

View File

@ -0,0 +1,36 @@
---
sidebar_position: 7
title: "Troubleshooting & Reference"
---
# Troubleshooting & Reference
---
# Troubleshooting
| **Symptom** | **Likely Cause** | **Fix** |
| ------------------------------------------------ | ----------------------------------------------------------------- | ---------------------------------------------------------------- |
| `java -version` shows wrong version or not found | `JAVA_HOME` or `PATH` not set correctly | Revisit Step 1, open a **new** terminal after changes |
| `javac` not found | JRE installed instead of JDK | Reinstall using the JDK download |
| `mvn -version` not found | `mvn -version` not found | Revisit Step 2 |
| Maven build fails with dependency not found | `settings.xml` not configured or wrong credentials | Revisit Step 3 |
| Cannot connect to SQL Server from SSMS | TCP/IP disabled or port 1433 blocked | Revisit Steps 5.2 and 5.5 |
| Application fails to connect to DB at runtime | Wrong credentials in `database.properties`, or TCP/IP not enabled | Revisit Steps 5.2 and 9 |
| `database.properties` not found at runtime | File placed in wrong directory | Confirm the file is at `\src\main\resources\database.properties` |
| Tomcat not found in NetBeans | Server not registered | Revisit Step 10.3 |
| NetBeans using wrong JDK | JDK 8 not registered as a Java Platform | Revisit Step 10.2 |
| Build succeeds but app doesn't start | Tomcat configuration issue | Check the NetBeans Output panel for the full stack trace |
---
# Reference Links
| **Resource** | **URL** |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------- |
| Team Resources Repository | [LINK](http://145.239.66.197:3000/othmane/team-resources) |
| Stock Project Repository | [LINK](http://145.239.66.197:3000/TrizTech/TrizStockRepository) |
| Stock Database Release Assets | [LINK](http://145.239.66.197:3000/othmane/team-resources/releases/tag/life_07-04-2026) |
| Gitea Maven Registry | [LINK](http://145.239.66.197:3000/othmane/-/packages/) |
| `database.properties` Template | [LINK](http://145.239.66.197:3000/othmane/team-resources/src/branch/main/uses/stock/database.properties) |
| `settings.xml` Template | [LINK](http://145.239.66.197:3000/othmane/team-resources/src/branch/main/_global/maven/settings.xml.template) |

View File

@ -0,0 +1,8 @@
{
"label": "Environment Setup Guide",
"position": 1,
"link": {
"type": "generated-index",
"description": "Complete guide to setting up the TrizStock development environment from scratch."
}
}

View File

@ -0,0 +1,27 @@
---
sidebar_position: 1
title: "Prerequisites & Overview"
---
# Prerequisites & Overview
---
# Before You Start
Make sure you have the following before proceeding:
- **Local administrator rights** on your machine (required for most installations below)
- Access to our [Gitea instance](http://145.239.66.197:3000/).
- Your Gitea account credentials (request from your team lead if you don't have one yet)
- The application database credentials (request from your team lead — these are never stored in any repository)
# Overview of the Stack
| **Component** | **Version** | **Purpose** |
| ---------------------------- | ----------- | ------------------------------- |
| Java SE (JDK) | 8 | Runtime and compiler |
| Apache Maven | Any recent | Dependency management and build |
| Apache Tomcat | 9 | Java EE application server |
| Microsoft SQL Server | 2012 | Database engine |
| SQL Server Management Studio | Any recent | Database GUI client |
| NetBeans IDE | 17 | Development environment |

View File

@ -1,227 +0,0 @@
---
sidebar_position: 1
title: "Developer Task Workflow"
description: "Standard workflow from task assignment to completion using the rebase-then-merge strategy."
---
>**Audience:** All developers on the team. This document describes the standard workflow to follow from the moment a task is assigned to the moment it is marked as complete.
<div style={{pageBreakBefore: 'always'}}></div>
# Overview
The team uses a **rebase-then-merge** workflow. Each task is developed in isolation on its own feature branch, rebased onto the latest `dev` before merging, and then both branches are pushed to remote together. This keeps the `dev` branch history clean and linear.
<div style={{pageBreakBefore: 'always'}}></div>
# Workflow
## Step 1 — Read the Task
- Open Gitea and navigate to the issue assigned to you.
- Read the task carefully, including any comments or attachments.
- Make sure you understand the requirements before starting. If anything is unclear, ask before writing any code.
## Step 2 — Start the Timer
- Start your timer as soon as you begin working on the task.
- The timer should reflect actual working time on the task, so start it now and not before you have read and understood it.
## Step 3 — Update Your Local `dev` Branch
Before creating your feature branch, make sure your local `dev` is up to date:
```Shell
git checkout dev
git pull
```
>Never branch off a stale `dev`. Always pull first to avoid basing your work on outdated code.
## Step 4 — Create the Feature Branch
Create and immediately check out a new branch from `dev`, named after the task number:
```Shell
git checkout -b feature/<task_number>
```
For example, for task #42:
```Shell
git checkout -b feature/42
```
>The branch name must follow this exact format — `feature/` followed by the task number. This links the branch clearly to the task on Gitea.
## Step 5 — Work on the Task
- Implement the changes required by the task on your feature branch.
- Commit your work as you go with clear, descriptive commit messages:
```Shell
git add .
git commit -m "#<task_number> - Short description of what was done"
```
For example:
```Shell
git commit -m "#42 - Add stock export to Excel functionality"
```
>You may have as many commits as needed on your feature branch.
## Step 6 — Update `dev` Again Before Rebasing
Before rebasing, fetch the latest changes from remote so your rebase is based on the most current state of `dev`:
```Shell
git checkout dev
git pull
```
>This step is important. If another developer pushed to `dev` while you were working, you need those changes before you rebase, otherwise you may introduce conflicts or overwrite work.
## Step 7 — Switch Back to Your Feature Branch
```Shell
git checkout feature/<task_number>
```
## Step 8 — Rebase the Feature Branch onto `dev`
```Shell
git rebase dev
```
This replays your commits on top of the latest `dev`, as if you had started your work from the current state of the branch. The result is a clean, linear history with no unnecessary merge commits from intermediate states.
>If conflicts arise during the rebase:
>1. Git will pause and show which files have conflicts.
>2. Open the conflicting files, resolve the conflicts manually.
>3. Stage the resolved files:
>```Shell
>git add <file>
>```
>4. Continue the rebase:
>```Shell
>git rebase --continue
>```
>5. Repeat until the rebase completes.
>
>If you need to abort and start over:
>```Shell
>git rebase --abort
>```
## Step 9 — Switch to `dev` to Merge
```Shell
git checkout dev
```
## Step 10 — Merge the Feature Branch into `dev`
```Shell
git merge feature/<task_number>
```
Because the feature branch was just rebased onto `dev`, this merge will be a fast-forward and will produce a clean merge commit on top of `dev`.
## Step 11 — Push Both Branches to Remote
Push both the `dev` branch and the feature branch to remote in one operation from NetBeans, or via the terminal:
```Shell
git push origin dev
git push origin feature/<task_number>
```
>Both branches must be pushed. Pushing `dev` makes your work available to the rest of the team. Pushing the feature branch keeps the remote in sync and preserves the full history of the task for reference.
## Step 12 — Copy the Merge Commit Hash from Gitea
1. Open Gitea and navigate to the **`dev` branch** of the Stock repository.
2. The most recent commit at the top of the branch is the merge commit produced in Step 10.
3. Copy the commit hash shown next to it.
>This is the hash that identifies exactly what was merged and when. It is the definitive reference for the work done in this task.
## Step 13 — Update the Task on Gitea
Go back to the issue assigned to you and post a comment containing:
- The **merge commit hash** copied in Step 12
- A **description of what was done** — what was implemented, any decisions made, anything relevant for the reviewer or for future reference
Example comment:
```
Commit: a3f1c7d
Implemented the Excel export feature for the stock listing page.
Added a new ExportService class, hooked it into the existing StockController,
and used the aspose-cells library for the file generation.
Tested with datasets of up to 10,000 rows.
```
## Step 14 — Stop the Timer
Stop your timer. The task is complete.
<div style={{pageBreakBefore: 'always'}}></div>
# Quick Reference
For experienced developers, here is the full sequence of commands in order:
```Shell
# Get latest dev
git checkout dev
git pull
# Create and switch to feature branch
git checkout -b feature/<task_number>
# ... do your work, commit as you go ...
# Get latest dev again before rebasing
git checkout dev
git pull
# Switch back to feature branch and rebase
git checkout feature/<task_number>
git rebase dev
# Merge into dev
git checkout dev
git merge feature/<task_number>
# Push both branches
git push origin dev
git push origin feature/<task_number>
```
Then go to Gitea: copy the merge commit hash from the top of `dev`, post it on the task with a description, and stop the timer.
<div style={{pageBreakBefore: 'always'}}></div>
# Branch Naming Reference
| Type | Format | Example |
|---|---|---|
| Development branch | `dev` | `dev` |
| Feature branch | `feature/<task_number>` | `feature/42` |
<div style={{pageBreakBefore: 'always'}}></div>
# Common Mistakes to Avoid
| Mistake | Why it is a problem |
| ---------------------------------------------- | -------------------------------------------------------------------- |
| Branching off `dev` without pulling first | Your feature branch starts from stale code, causing conflicts later |
| Skipping the second `git pull` before rebasing | You rebase on an outdated `dev` and miss changes from teammates |
| Forgetting to rebase before merging | Produces a messy history with unnecessary intermediate merge commits |
| Pushing only `dev` and not the feature branch | The feature branch on remote becomes out of sync |
| Pushing only the feature branch and not `dev` | Your work never reaches the team |
| Not posting the commit hash on the task | The task has no traceable link to the code that implements it |

View File

@ -0,0 +1,69 @@
---
sidebar_position: 2
title: "Development & Rebasing"
---
# Development & Rebasing
---
## Step 5 — Work on the Task
- Implement the changes required by the task on your feature branch.
- Commit your work as you go with clear, descriptive commit messages:
```bash
git add .
git commit -m "#<task_number> - Short description of what was done"
```
For example:
```bash
git commit -m "#42 - Add stock export to Excel functionality"
```
> You may have as many commits as needed on your feature branch.
## Step 6 — Update `dev` Again Before Rebasing
Before rebasing, fetch the latest changes from remote so your rebase is based on the most current state of `dev`:
```bash
git checkout dev
git pull
```
> This step is important. If another developer pushed to `dev` while you were working, you need those changes before you rebase, otherwise you may introduce conflicts or overwrite work.
## Step 7 — Switch Back to Your Feature Branch
```bash
git checkout feature/<task_number>
```
## Step 8 — Rebase the Feature Branch onto `dev`
```bash
git rebase dev
```
This replays your commits on top of the latest `dev`, as if you had started your work from the current state of the branch. The result is a clean, linear history with no unnecessary merge commits from intermediate states.
> If conflicts arise during the rebase:
> 1. Git will pause and show which files have conflicts.
> 2. Open the conflicting files, resolve the conflicts manually.
> 3. Stage the resolved files:
> ```bash
> git add <file>
> ```
> 4. Continue the rebase:
> ```bash
> git rebase --continue
> ```
> 5. Repeat until the rebase completes.
>
> If you need to abort and start over:
> ```bash
> git rebase --abort
> ```

View File

@ -0,0 +1,62 @@
---
sidebar_position: 3
title: "Merging & Completing"
---
# Merging & Completing
---
## Step 9 — Switch to `dev` to Merge
```bash
git checkout dev
```
## Step 10 — Merge the Feature Branch into `dev`
```bash
git merge feature/<task_number>
```
Because the feature branch was just rebased onto `dev`, this merge will be a fast-forward and will produce a clean merge commit on top of `dev`.
## Step 11 — Push Both Branches to Remote
Push both the `dev` branch and the feature branch to remote in one operation from NetBeans, or via the terminal:
```bash
git push origin dev
git push origin feature/<task_number>
```
> Both branches must be pushed. Pushing `dev` makes your work available to the rest of the team. Pushing the feature branch keeps the remote in sync and preserves the full history of the task for reference.
## Step 12 — Copy the Merge Commit Hash from Gitea
1. Open Gitea and navigate to the **`dev` branch** of the Stock repository.
2. The most recent commit at the top of the branch is the merge commit produced in Step 10.
3. Copy the commit hash shown next to it.
> This is the hash that identifies exactly what was merged and when. It is the definitive reference for the work done in this task.
## Step 13 — Update the Task on Gitea
Go back to the issue assigned to you and post a comment containing:
- The **merge commit hash** copied in Step 12
- A **description of what was done** — what was implemented, any decisions made, anything relevant for the reviewer or for future reference
Example comment:
```text
Commit: a3f1c7d
Implemented the Excel export feature for the stock listing page.
Added a new ExportService class, hooked it into the existing StockController,
and used the aspose-cells library for the file generation.
Tested with datasets of up to 10,000 rows.
```
## Step 14 — Stop the Timer
Stop your timer. The task is complete.

View File

@ -0,0 +1,63 @@
---
sidebar_position: 4
title: "Reference & Troubleshooting"
---
# Reference & Troubleshooting
---
# Quick Reference
For experienced developers, here is the full sequence of commands in order:
```bash
# Get latest dev
git checkout dev
git pull
# Create and switch to feature branch
git checkout -b feature/<task_number>
# ... do your work, commit as you go ...
# Get latest dev again before rebasing
git checkout dev
git pull
# Switch back to feature branch and rebase
git checkout feature/<task_number>
git rebase dev
# Merge into dev
git checkout dev
git merge feature/<task_number>
# Push both branches
git push origin dev
git push origin feature/<task_number>
```
Then go to Gitea: copy the merge commit hash from the top of `dev`, post it on the task with a description, and stop the timer.
---
# Branch Naming Reference
| Type | Format | Example |
|---|---|---|
| Development branch | `dev` | `dev` |
| Feature branch | `feature/<task_number>` | `feature/42` |
---
# Common Mistakes to Avoid
| Mistake | Why it is a problem |
| ---------------------------------------------- | -------------------------------------------------------------------- |
| Branching off `dev` without pulling first | Your feature branch starts from stale code, causing conflicts later |
| Skipping the second `git pull` before rebasing | You rebase on an outdated `dev` and miss changes from teammates |
| Forgetting to rebase before merging | Produces a messy history with unnecessary intermediate merge commits |
| Pushing only `dev` and not the feature branch | The feature branch on remote becomes out of sync |
| Pushing only the feature branch and not `dev` | Your work never reaches the team |
| Not posting the commit hash on the task | The task has no traceable link to the code that implements it |

View File

@ -0,0 +1,8 @@
{
"label": "Developer Task Workflow",
"position": 2,
"link": {
"type": "generated-index",
"description": "Standard workflow from task assignment to completion using the rebase-then-merge strategy."
}
}

View File

@ -0,0 +1,56 @@
---
sidebar_position: 1
title: "Overview & Starting Work"
---
# Overview & Starting Work
> **Audience:** All developers on the team. This document describes the standard workflow to follow from the moment a task is assigned to the moment it is marked as complete.
---
# Overview
The team uses a **rebase-then-merge** workflow. Each task is developed in isolation on its own feature branch, rebased onto the latest `dev` before merging, and then both branches are pushed to remote together. This keeps the `dev` branch history clean and linear.
---
# Workflow
## Step 1 — Read the Task
- Open Gitea and navigate to the issue assigned to you.
- Read the task carefully, including any comments or attachments.
- Make sure you understand the requirements before starting. If anything is unclear, ask before writing any code.
## Step 2 — Start the Timer
- Start your timer as soon as you begin working on the task.
- The timer should reflect actual working time on the task, so start it now and not before you have read and understood it.
## Step 3 — Update Your Local `dev` Branch
Before creating your feature branch, make sure your local `dev` is up to date:
```bash
git checkout dev
git pull
```
> Never branch off a stale `dev`. Always pull first to avoid basing your work on outdated code.
## Step 4 — Create the Feature Branch
Create and immediately check out a new branch from `dev`, named after the task number:
```bash
git checkout -b feature/<task_number>
```
For example, for task #42:
```bash
git checkout -b feature/42
```
> The branch name must follow this exact format — `feature/` followed by the task number. This links the branch clearly to the task on Gitea.

View File

@ -1,5 +1,5 @@
// @ts-check
import {themes as prismThemes} from 'prism-react-renderer';
import { themes as prismThemes } from 'prism-react-renderer';
/** @type {import('@docusaurus/types').Config} */
const config = {
@ -80,7 +80,7 @@ const config = {
title: 'TrizTech Docs',
logo: {
alt: 'TrizTech Logo',
src: 'img/logo.svg',
src: 'img/logo.png',
},
items: [
{

BIN
static/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

View File

@ -1,10 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none">
<defs>
<linearGradient id="logoGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#6366F1"/>
<stop offset="100%" style="stop-color:#4F46E5"/>
</linearGradient>
</defs>
<rect width="32" height="32" rx="8" fill="url(#logoGrad)"/>
<text x="16" y="22.5" font-family="Inter, system-ui, sans-serif" font-weight="800" font-size="19" fill="white" text-anchor="middle">T</text>
</svg>

Before

Width:  |  Height:  |  Size: 527 B