The Professional Tax Portal is a full-stack web application for managing professional tax registration for Tripura State, India. It enables users to enroll, update, and view tax-related details through a secure, multi-step process. The backend is built with Java (Spring Boot), and the frontend uses React (TypeScript) with Vite and Tailwind CSS.
- Frontend: React.js (TypeScript), Vite, Tailwind CSS, Radix UI, shadcn/ui
- Backend: Spring Boot (Java 17+), PostgreSQL, RESTful APIs
- Database: PostgreSQL with automatic schema and master data initialization
- Deployment: Docker, Vercel (frontend), local and cloud support
- 8-step enrollment process with OTP verification
- Multi-step wizard UI with real-time validation and progress indicator
- Responsive, government-standard design
- Automatic database setup and master data population
- REST API endpoints for all major operations
- Secure session management and input validation
- Admin endpoints for database management
- api/: Node.js/Express serverless functions for backend endpoints
- backend-professional-tax-portal/: Spring Boot backend, database schema, and resources
- frontend-professional-tax-portal/: React frontend, UI components, pages, hooks, and types
Master tables:
mas_district
: Districts of Tripuramtbl_area
: Administrative areasmtbl_charge
: Charge officesmtbl_role
: User rolesmtbl_ptax_category
: Professional tax categoriesmtbl_ptax_category_subcategory
: Subcategories for detailed classification Application tables:mtbl_users_taxpayers
: User accountsttbl_applicant_enrolment_details
: Enrollment applicationsttbl_applicant_profession_details
,ttbl_applicant_trade_details
,ttbl_applicant_calling_details
,ttbl_applicant_employment_details
: Detailed applicant info Temporary tables for draft applications and OTP verification
GET /api/master-data/all
- All master dataGET /api/master-data/districts
- DistrictsGET /api/master-data/areas/{districtId}
- Areas by districtGET /api/master-data/charges/{areaId}
- Charges by areaGET /api/master-data/categories
- CategoriesGET /api/master-data/subcategories/{categoryId}
- Subcategories
POST /api/enrollment/submit
- Submit applicationPOST /api/enrollment/verify-otp
- Verify OTPGET /api/enrollment/status/{applicationId}
- Application status
POST /api/otp/send
- Send OTPPOST /api/otp/verify
- Verify OTP
GET /api/admin/database/status
- Check DB statusPOST /api/admin/database/initialize
- Manual DB initPOST /api/admin/database/reset
- Reset DBGET /api/admin/database/verify
- Verify DB setup
- Java 17+, Node.js 18+, PostgreSQL 12+, Docker, Git
- Clone repo:
git clone <repository-url>
- Database:
./setup_postgres.sh
or manual SQL scripts - Backend:
cd backend-professional-tax-portal && ./mvnw spring-boot:run
- Frontend:
cd frontend-professional-tax-portal && npm install && npm start
- Full stack:
docker-compose up --build -d
- Backend only:
docker build -t ptax-backend . && docker run ...
- Database:
docker run -d --name ptax_postgres ...
- Install Vercel CLI:
npm install -g vercel
- Deploy:
vercel --prod
- Configure environment variables in Vercel dashboard
- OTP-based verification, CSRF/session protection
- Input validation (Zod, server-side)
- HTTPS, security headers, CORS
- Database connection pooling, query optimization
- Static asset caching, bundle optimization
- Check logs:
docker-compose logs -f backend
/frontend
- Database issues: verify connection string, credentials, container status
- CORS errors: check allowed origins
- Frontend build: clear npm cache, reinstall modules
- Use admin endpoints for DB reset/verify
- User fills out multi-step form in frontend
- Frontend sends data to backend via REST API
- Backend validates, saves, and responds with status
- Frontend displays confirmation and next steps
- MIT License
- Developed for Government of Tripura, Commissionerate of Taxes & Excise
- For issues: check logs, use admin endpoints, review troubleshooting section