A full-stack web application that scans project folders (uploaded as ZIP files) and detects programming languages, frameworks, tools, and libraries used in the project.
- ZIP file upload and scanning
- Technology detection (languages, frameworks, tools)
- Duplicate scan detection - Prevents re-scanning identical projects
- Pagination - Browse through scan history efficiently
- Filtering - Filter scans by project name, language, or framework
- Sorting - Sort by date or project name
- Delete scans - Remove unwanted scan results
- Persistent storage - Data survives server restarts
- Configurable file size limits
Before you begin, ensure you have the following installed:
- .NET 8 SDK - Download here
- Node.js 18+ and npm - Download here
- Modern web browser (Chrome, Firefox, Edge, Safari)
- Git (optional, for cloning the repository)
- Technology: ASP.NET Core 8.0
- Storage: File-based JSON storage (scan-results.json)
- Features:
- ZIP file upload and extraction
- SHA256 hash-based duplicate detection
- Technology detection from file extensions and configuration files
- Language analysis
- Framework and library detection (npm, NuGet, etc.)
- RESTful API endpoints with pagination and filtering
- Standardized error responses
- CORS enabled for React frontend
- Technology: React 19, TypeScript, Vite
- UI Library: Material-UI (MUI)
- Routing: React Router v7
- Features:
- File upload interface with size display
- Duplicate scan detection dialog
- Scan results visualization
- Scan history management with pagination
- Advanced filtering and sorting
- Delete functionality with confirmation dialogs
- Responsive Material Design
CopilotCourse/
├── CodebaseTechnologyScanner.API/ # Backend .NET Web API
│ ├── Controllers/
│ │ └── ScanController.cs
│ ├── Services/
│ │ ├── IScanService.cs
│ │ ├── ScanService.cs
│ │ └── TechnologyDetector.cs
│ ├── Repositories/
│ │ ├── IScanRepository.cs
│ │ └── FileScanRepository.cs
│ ├── Models/
│ │ ├── ScanRequest.cs
│ │ ├── ScanResult.cs
│ │ ├── TechnologyInfo.cs
│ │ ├── ErrorResponse.cs
│ │ ├── PaginatedResponse.cs
│ │ └── DeleteResponse.cs
│ ├── Utils/
│ │ ├── FileSizeHelper.cs
│ │ └── HashHelper.cs
│ ├── Program.cs
│ └── appsettings.json
│
└── codebase-scanner-ui/ # Frontend React App
├── src/
│ ├── components/
│ │ ├── Header.tsx
│ │ ├── Footer.tsx
│ │ └── ScanResultCard.tsx
│ ├── layouts/
│ │ └── MainLayout.tsx
│ ├── pages/
│ │ ├── HomePage.tsx
│ │ ├── NewScanPage.tsx
│ │ ├── ScanResultsPage.tsx
│ │ └── ScanHistoryPage.tsx
│ ├── services/
│ │ └── scanService.ts
│ ├── models/
│ │ ├── ScanRequest.ts
│ │ ├── ScanResult.ts
│ │ ├── TechnologyInfo.ts
│ │ ├── ErrorResponse.ts
│ │ ├── PaginatedResponse.ts
│ │ └── DeleteResponse.ts
│ ├── App.tsx
│ └── main.tsx
└── package.json
- Home Page (
/) - Landing page with application overview - New Scan Page (
/scan) - Upload ZIP file and initiate scan - Scan Results Page (
/results/:id) - View detailed scan results - Scan History Page (
/history) - Browse, filter, sort, and manage past scans
-
Navigate to the API directory:
cd CodebaseTechnologyScanner.API -
Restore dependencies:
dotnet restore
-
(Optional) Update
appsettings.jsonto customize settings:{ "StorageFilePath": "scan-results.json", "MaxUploadSizeBytes": 52428800 } -
Run the API:
dotnet run
The API will start on:
- HTTP:
http://localhost:5000 - HTTPS:
https://localhost:7094 - Swagger UI:
http://localhost:5000/swagger
- HTTP:
-
Navigate to the UI directory:
cd codebase-scanner-ui -
Install dependencies:
npm install
-
(Optional) Update API URL if needed in
src/services/scanService.ts:const API_BASE_URL = 'http://localhost:5000/api';
-
Run the development server:
npm run dev
The app will start on
http://localhost:5173
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/scan |
Upload and scan a ZIP file |
GET |
/api/scan/{id} |
Get a specific scan by ID |
GET |
/api/scan/history |
Get paginated scan history with filtering and sorting |
DELETE |
/api/scan/{id} |
Delete a scan by ID |
page- Page number (default: 1)pageSize- Items per page (default: 20, max: 100)sortBy- Sort field:timestamporprojectName(default:timestamp)sortOrder- Sort order:ascordesc(default:desc)projectName- Filter by project name (partial, case-insensitive)language- Filter by detected languageframework- Filter by detected framework
Scan a project:
curl -X POST http://localhost:5000/api/scan \
-F "zipFile=@project.zip" \
-F "projectName=My Project"Get scan history (filtered and sorted):
curl "http://localhost:5000/api/scan/history?page=1&pageSize=20&sortBy=timestamp&sortOrder=desc&projectName=react"Delete a scan:
curl -X DELETE http://localhost:5000/api/scan/{scanId}- Start both the backend API and frontend application
- Navigate to
http://localhost:5173in your browser - Click "Start New Scan" or navigate to the "New Scan" page
- Upload a ZIP file of your project
- Optionally provide a project name
- Click "Scan Project"
- View the results showing detected languages, frameworks, and tools
- If you upload a file that was previously scanned, you'll see a dialog
- Choose to view the existing scan or cancel
- Prevents unnecessary re-scanning of identical projects
- Navigate to "History" page
- Filter: Use the filter panel to search by project name, language, or framework
- Sort: Sort results by date or project name (ascending/descending)
- Paginate: Use pagination controls to browse through results
- Delete: Click the delete icon to remove unwanted scans (with confirmation)
- From History page: Click the delete icon next to any scan
- From Results page: Click the delete icon in the top-right corner
- Confirm the deletion in the dialog
- The scan will be permanently removed
{
"StorageFilePath": "scan-results.json",
"MaxUploadSizeBytes": 52428800 // 50 MB (configurable: 1KB to 1GB)
}const API_BASE_URL = 'http://localhost:5000/api';Scan results are stored in a JSON file (scan-results.json) in the API's root directory. This file persists across server restarts, ensuring scan history is maintained.
Storage Location: CodebaseTechnologyScanner.API/scan-results.json
All API errors follow a standardized format:
{
"error": "Human-readable error message",
"statusCode": 400,
"details": "Additional context (optional)"
}| Status Code | Scenario | Additional Fields |
|---|---|---|
400 |
Bad Request | Standard error format |
404 |
Scan Not Found | Standard error format |
409 |
Duplicate Scan | existingScanId included |
413 |
File Too Large | Maximum size in details |
500 |
Server Error | Error details in details |
- .NET 8 - Modern, high-performance framework
- ASP.NET Core Web API - RESTful API framework
- System.IO.Compression - ZIP file handling
- System.Text.Json - JSON serialization
- SHA256 - File hash for duplicate detection
- Swagger/OpenAPI - API documentation
- React 19 - Latest React with concurrent features
- TypeScript - Type-safe JavaScript
- Vite - Fast build tool and dev server
- Material-UI (MUI) - Modern React component library
- React Router v7 - Client-side routing
- Emotion - CSS-in-JS styling
- Axios - HTTP client (via fetch wrapper)
- File-based JSON storage - No external database required
- In-memory caching - Fast data access
- Atomic writes - Data consistency
- Automatic detection of identical project uploads
- SHA256 hash comparison for file integrity
- Option to view existing scan instead of re-scanning
- Saves processing time and storage
- Efficient browsing of large scan histories
- Configurable page size (1-100)
- First/Previous/Next/Last navigation
- Total count and current page display
- URL-based state for bookmarking
- Filter by project name (case-insensitive partial match)
- Filter by detected language
- Filter by detected framework
- Combine multiple filters
- Real-time results update
- Sort by timestamp (newest/oldest first)
- Sort by project name (A-Z or Z-A)
- Persistent across filter changes
- Stable sort algorithm
- Remove unwanted scans from history
- Confirmation dialog prevents accidental deletion
- Automatic data refresh after deletion
- Cascade delete (removes all associated data)
The scanner can detect:
- C#, JavaScript, TypeScript, Python, Java, Go, Rust, PHP, Ruby, Swift, Kotlin, and more
- Frontend: React, Angular, Vue.js, Svelte, Next.js, Vite
- Backend: ASP.NET Core, Express.js, Django, Flask, Spring Boot
- Mobile: React Native, Flutter, Xamarin
- Testing: Jest, Vitest, xUnit, NUnit, MSTest, Moq
- npm, Yarn, NuGet, pip, Maven, Gradle, Cargo, Composer
- package.json, *.csproj, requirements.txt, pom.xml, build.gradle, Cargo.toml
Problem: API won't start
- Solution: Ensure .NET 8 SDK is installed:
dotnet --version - Check if port 5000/7094 is already in use
Problem: File upload fails
- Solution: Check file size is under the configured limit
- Ensure the file is a valid ZIP archive
- Check disk space availability
Problem: Scan results not persisting
- Solution: Verify write permissions for
scan-results.json - Check storage file path in
appsettings.json
Problem: Can't connect to API
- Solution: Verify API is running on
http://localhost:5000 - Check CORS settings in
Program.cs - Verify API URL in
scanService.ts
Problem: Build fails
- Solution: Delete
node_modulesand runnpm installagain - Clear Vite cache:
npm run build -- --force
Problem: Page not found (404) on refresh
- Solution: This is expected in dev mode. Use the app's navigation or go to the home page
cd CodebaseTechnologyScanner.API
dotnet testcd codebase-scanner-ui
npm testcd CodebaseTechnologyScanner.API
dotnet publish -c Release -o ./publishcd codebase-scanner-ui
npm run buildThe production build will be in the dist/ directory.
- Built with .NET 8
- UI powered by Material-UI
- Frontend built with Vite
- Icons from Material Icons
Note: This application is designed for development and educational purposes.