Backend for VisaScope — H1B Petition Tracker
REST API that ingests, stores, and serves USCIS H1B employer petition data.
🔗 [Coming Soon — hosted on AWS EC2]
- 📥 USCIS CSV Ingestion — Loads H1B employer data directly from official USCIS data hub CSVs
- 🔎 Company Search API — Full-text employer name search
- ✅ 2-Year Filing Check — Determines if a company filed new H1Bs or H1B transfers in the last 2 fiscal years
- 📄 Paginated Data API — Efficient paginated access to the full dataset
- 🔒 CORS Configured — Ready to connect with the Angular frontend
| Layer | Technology |
|---|---|
| Language | Java 21 |
| Framework | Spring Boot 3.2 |
| ORM | Spring Data JPA / Hibernate |
| Database | PostgreSQL (AWS RDS Free Tier) |
| Build Tool | Maven |
| CSV Parsing | OpenCSV |
| Hosting | AWS EC2 (t2.micro Free Tier) |
| Data Source | USCIS H1B Employer Data Hub |
visa-scope-api/
├── src/
│ └── main/
│ ├── java/com/h1btracker/
│ │ ├── VisaScopeApiApplication.java
│ │ ├── controller/
│ │ │ └── H1bController.java # REST endpoints
│ │ ├── service/
│ │ │ └── H1bService.java # Business logic
│ │ ├── repository/
│ │ │ └── H1bRepository.java # DB queries
│ │ ├── model/
│ │ │ └── H1bPetition.java # JPA Entity
│ │ └── loader/
│ │ └── CsvDataLoader.java # USCIS CSV import
│ └── resources/
│ ├── application.properties
│ └── data/ # Place USCIS CSVs here
├── pom.xml
└── README.md
- Java 21 → Download Temurin (free)
- Maven → Download
- PostgreSQL (local) or AWS RDS instance
# Clone the repo
git clone https://github.com/hvemuri9/visa-scope-api.git
cd visa-scope-api
# Build the project
mvn clean install
# Run locally
mvn spring-boot:run-- Run in PostgreSQL
CREATE DATABASE h1bdb;
CREATE USER h1badmin WITH PASSWORD 'yourpassword';
GRANT ALL PRIVILEGES ON DATABASE h1bdb TO h1badmin;spring.datasource.url=jdbc:postgresql://localhost:5432/h1bdb
spring.datasource.username=h1badmin
spring.datasource.password=yourpassword
spring.jpa.hibernate.ddl-auto=update
server.port=8080- Download CSV files from the USCIS H1B Employer Data Hub
- Download FY2024 and FY2025 files
- Place them in
src/main/resources/data/ - On app startup,
CsvDataLoaderwill automatically parse and insert records into PostgreSQL
GET /api/h1b/search?company={name}
Response: List of H1B petition records matching the company name
GET /api/h1b/check-recent?company={name}
Response:
{
"company": "Google",
"filedNewH1B": true,
"filedTransfer": true,
"yearsChecked": [2024, 2025],
"records": [...]
}GET /api/h1b/all?page=0&size=20
Response: Paginated list of all H1B petition records
# Build JAR
mvn clean package -DskipTests
# SCP to EC2
scp -i your-key.pem target/visa-scope-api-0.0.1-SNAPSHOT.jar ec2-user@YOUR-EC2-IP:~/
# SSH into EC2 and run
ssh -i your-key.pem ec2-user@YOUR-EC2-IP
java -jar visa-scope-api-0.0.1-SNAPSHOT.jar &EC2 Security Group: Open inbound port 8080 for your frontend's origin.
- Load USCIS data from FY2023 and earlier
- Add DOL LCA data for salary info
- Scheduled quarterly data refresh
- Add caching with Spring Cache
- Swagger/OpenAPI documentation
This API is consumed by visa-scope-ui — the Angular 8 frontend.
hvemuri9
GitHub: @hvemuri9
MIT License — free to use and modify.