Empowering New Jersey residents with data-driven career insights and training opportunities
- π Overview
- β¨ Key Features
- ποΈ Architecture
- π Getting Started
- π Project Structure
- π» Development
- π’ Deployment
- π§ͺ Testing
- π οΈ Tools and Libraries
- β Troubleshooting
- π Additional Resources
- π€ Contributing
- π Support
- π Acknowledgments
My Career NJ is an official career development platform of the New Jersey Department of Labor & Workforce Development. This open-source web application (mycareer.nj.gov) serves as a comprehensive one-stop shop for New Jersey residents to explore training programs, discover in-demand career opportunities, and receive data-driven career advice tailored to their unique experiences and goals.
To provide accessible, user-friendly, and data-driven career development tools that help New Jersey residents advance their careers and contribute to the state's economic growth.
This platform is developed and maintained by the New Jersey Department of Labor & Workforce Development as part of the state's commitment to supporting workforce development and economic advancement. It serves as a bridge between job seekers, training providers, and employers across New Jersey.
Note: This repository does not currently include the Career Navigator component, which is maintained separately.
- π Training Program Explorer - Search and compare educational and training programs across New Jersey
- π In-Demand Career Insights - Access real-time labor market data and career trends
- πΊοΈ Career Pathways - Interactive career exploration with step-by-step guidance
- π Multilingual Support - Available in English and Spanish for broader accessibility
- π± Responsive Design - Optimized for desktop, tablet, and mobile devices
- βΏ Accessibility First - Built with WCAG compliance and comprehensive a11y testing
- π Advanced Search - Filter training programs by location, cost, duration, and outcomes
- πΌ Occupation Details - Comprehensive information including salary estimates and education requirements
- π Data Integration - Real-time data from O*NET and CareerOneStop APIs
- Frontend: Next.js 15 with React 19 and TypeScript
- Backend: TypeScript with Express-based server API
- Database: Multiple PostgreSQL tables (imported from CSV files in
backend/datadirectory) - Deployment: Amazon Web Services (AWS) instances running Node.js 20
- CI/CD: GitHub Actions for continuous integration and deployment
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β Frontend β β Backend β β Database β
β (React) βββββΊβ (Express) βββββΊβ (PostgreSQL)β
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β
βΌ
ββββββββββββββββ
β External APIsβ
β (O*NET, COS) β
ββββββββββββββββ
For detailed information about data tables and schema, see the data model documentation.
Before you begin, ensure you have the following installed:
- Node.js >= 18.0.0 (Download)
- npm >= 8.0.0 (comes with Node.js)
- PostgreSQL >= 12.0 (Download)
- Git (Download)
For Apple Silicon Mac users:
brew install jq-
Clone the repository
git clone https://github.com/newjersey/dol-mcnj-main.git cd dol-mcnj-main -
Install dependencies
./scripts/install-all.sh
-
Set up PostgreSQL database
Create the local database:
psql -c 'create database d4adlocal;' -U postgresRun database migrations:
./scripts/db-migrate.sh
β οΈ Troubleshooting: If you encounter a password error, update the postgres password in:backend/database.json(line 6)backend/src/app.ts(fallback value)
-
Start the development servers
In one terminal, start the backend:
./scripts/backend-start.sh
In another terminal, start the frontend:
./scripts/frontend-start.sh
The application will automatically open at
http://localhost:3000
To verify your setup is working correctly:
- β
Frontend loads at
http://localhost:3000 - β
Backend API responds at
http://localhost:8080 - β Database connection is successful (check backend console logs)
- β No error messages in browser console
dol-mcnj-main/
βββ π src/ # Next.js application source
β βββ π app/ # Next.js App Router pages
β βββ π components/ # React components
β β βββ π utility/ # Generic UI components
β β βββ π modules/ # Reusable features
β β βββ π blocks/ # Complex composites
β β βββ π global/ # Site-wide components
β βββ π data/ # Static data files
β βββ οΏ½ utils/ # Utility functions
βββ π backend/ # Express TypeScript API
β βββ π src/ # Source code
β β βββ π routes/ # API route handlers
β β βββ π domain/ # Business logic
β β βββ π database/ # Database utilities
β βββ π data/ # CSV data files
β βββ π migrations/ # Database migrations
β βββ π package.json # Backend dependencies
βββ π cypress/ # End-to-end tests
βββ π scripts/ # Build and deployment scripts
βββ π .github/ # GitHub Actions workflows
βββ οΏ½ docs/ # Documentation
βββ π README.md # This file
-
Frontend Configuration
package.json- Root dependencies and scriptsnext.config.ts- Next.js configurationtsconfig.json- TypeScript configurationeslint.config.mjs- ESLint rules
-
Backend Configuration
backend/package.json- Dependencies and scriptsbackend/database.json- Database connection settingsbackend/tsconfig.json- TypeScript configuration
-
CI/CD Configuration
.github/workflows/- GitHub Actions workflows
Always use the ship-it script for pushing changes (why?):
./scripts/ship-it.sh| Script | Purpose | Usage |
|---|---|---|
install-all.sh |
Install all dependencies | ./scripts/install-all.sh |
backend-start.sh |
Start backend dev server | ./scripts/backend-start.sh |
frontend-start.sh |
Start frontend dev server | ./scripts/frontend-start.sh |
build.sh |
Build for production | ./scripts/build.sh |
test-all.sh |
Run all tests and linting | ./scripts/test-all.sh |
feature-tests.sh |
Run Cypress e2e tests | ./scripts/feature-tests.sh |
ship-it.sh |
Deploy changes | ./scripts/ship-it.sh |
- TypeScript: Strict type checking enabled
- Linting: ESLint with custom rules
- Formatting: Prettier for consistent code style
- Testing: Jest + React Testing Library for unit tests
- E2E Testing: Cypress with accessibility testing
This project uses good-fences to enforce module boundaries:
frontendandbackendcannot import from each other- Backend follows dependency inversion with
domainβroutes/database
Check dependency compliance:
npm --prefix=backend run fences
npm --prefix=frontend run fencesWe use GitHub Actions for automated deployments:
Phase 1: Parallel Checks
- π Lint & Format - Code quality checks
- π Security Audit - Vulnerability scanning
- οΏ½ JSDoc Coverage - Documentation coverage
- π§ͺ Frontend Tests - Next.js unit tests
- π§ͺ Backend Tests - API unit tests with PostgreSQL
Phase 2: Build 6. οΏ½οΈ Build - Next.js production build
Phase 3: E2E 7. π E2E Tests - Cypress feature tests
See .github/workflows/README.md for detailed workflow documentation.
NODE_ENV- Environment (dev, test, awsdev, awstest, awsprod)IS_CI- Boolean flag for CI environment
DB_HOST_WRITER_AWSPROD- Production database hostDB_PASS_AWSPROD- Production database passwordDB_HOST_WRITER_AWSDEV- Development database hostDB_PASS_AWSDEV- Development database password
REACT_APP_FEATURE_MULTILANG- Enable/disable multi-language supportREACT_APP_FEATURE_CAREER_PATHWAYS- Toggle career pathways featureREACT_APP_FEATURE_CAREER_NAVIGATOR- Toggle Career Navigator landing pageREACT_APP_SIGNUP_FOR_UPDATES- Toggle user signup modal
ONET_BASEURL- O*NET API base URLONET_USERNAME- O*NET API usernameONET_PASSWORD- O*NET API passwordCAREER_ONESTOP_USERID- CareerOneStop API user IDCAREER_ONESTOP_AUTH_TOKEN- CareerOneStop API auth token
BASE_URL- Contentful GraphQL API base URLENVIRONMENT- Contentful environment (usually 'master')SPACE_ID- Contentful space IDSENTRY_DSN- Sentry error tracking DSN
ZIPCODE_BASEURL- Zipcode lookup service URLZIPCODE_API_KEY- Zipcode service API key
For manual deployments (not recommended for production):
# Build everything
./scripts/build.sh
# Start production server
./scripts/prod-start.sh- Unit Tests: Jest + React Testing Library
- E2E Tests: Cypress
- Accessibility: cypress-axe
- Linting: ESLint
- Formatting: Prettier
# Run all tests and linting
./scripts/test-all.sh
# Run only e2e tests
./scripts/feature-tests.sh
# Run frontend tests only
npm --prefix=frontend test
# Run backend tests only
npm --prefix=backend testTests cover:
- β Component rendering and interactions
- β API endpoint functionality
- β Database operations
- β User workflows (e2e)
- β Accessibility compliance
- β Responsive design
- UI Framework: Material UI + NJ Web Design System
- Routing: Reach Router
- Internationalization: i18next
- State Management: React Context + Hooks
- HTTP Client: Axios
- Form Handling:Yup
- Framework: Express.js
- Database: PostgreSQL with custom query builders
- Authentication: Custom middleware
- Error Tracking: Sentry
- AWS SDK: AWS SDK for Node.js
- Analytics: Google Analytics
- Accessibility: axe DevTools, WAVE
- API Testing: WireMock for mocking external APIs
- O*NET Web API - Occupation data and career information
- CareerOneStop - Labor market and training data
π API Access: Request access to the NJInnovation Bitwarden account for API keys
Node version issues
# Check Node version
node --version # Should be >= 18.0.0
# Use nvm to manage Node versions
nvm install 18
nvm use 18PostgreSQL connection errors
# Check if PostgreSQL is running
brew services list | grep postgres # macOS
sudo systemctl status postgresql # Linux
# Reset postgres password
psql -U postgres -c "ALTER USER postgres PASSWORD 'your_password';"Dependency installation failures
# Clear npm cache
npm cache clean --force
# Delete node_modules and reinstall
rm -rf node_modules backend/node_modules
./scripts/install-all.shFrontend won't start
- Check if port 3000 is available
- Ensure backend is running on port 8080
- Check browser console for errors
Backend API errors
- Verify database connection
- Check environment variables
- Review backend console logs
Database migration failures
# Check database exists
psql -U postgres -l | grep d4adlocal
# Run migrations manually
cd backend
npm run db:migrateCypress installation fails
# Install Cypress manually
cd frontend
npm install cypress --save-dev
npx cypress installTests fail in CI
- Check GitHub Actions secrets configuration
- Verify test database configuration
- Review workflow logs for specific failures
- Check Logs: Always check console output first
- Search Issues: Look through existing GitHub issues
- Documentation: Review additional documentation files
- Contact Team: Reach out via official support channels
π Complete Documentation Index - Centralized documentation portal
- π Security & Encryption:
docs/security/- PII encryption, KMS, security guides - π Deployment:
docs/deployment/- Production deployment procedures - ποΈ Database:
docs/database/- Data models, migrations, seeding - π Project:
docs/project/- Governance, decisions, contributors
- Live Application: mycareer.nj.gov
- NJ Department of Labor: nj.gov/labor
- New Jersey Web Design System: github.com/newjersey/njwds
- U.S. Web Design System: designsystem.digital.gov
- O*NET Web Services: services.onetcenter.org
- CareerOneStop API: careeronestop.org/Developers
We welcome contributions from developers, designers, content creators, and anyone passionate about improving career development tools!
- π Familiarize Yourself - Review project goals and technologies
- π Find Issues - Check our issue tracker for "good first issue" labels
- π΄ Fork & Clone - Fork the repository and clone to your machine
- π§ Make Changes - Follow our coding standards and include tests
- π Submit PR - Submit a pull request with clear description
- Follow the existing code style and conventions
- Include tests for new features
- Update documentation when necessary
- Ensure accessibility compliance
- Test across different browsers and devices
For detailed contribution guidelines, see CONTRIBUTORS.md.
We are committed to providing a welcoming and supportive environment. Please review and follow our Code of Conduct.
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Issues
- π§ General Questions: Contact us via My Career NJ contact form
- π Documentation: Check our additional resources
We extend our heartfelt gratitude to all contributors who have dedicated their time and expertise to improve My Career NJ. Your efforts make a meaningful difference in the lives of New Jersey residents.
- New Jersey Department of Labor & Workforce Development - Project sponsorship and guidance
- New Jersey Office of Innovation - Technical infrastructure and support
- Open Source Community - Libraries and tools that make this project possible
- New Jersey Residents - Feedback and insights that drive continuous improvement
- O*NET Program - Occupational data and career information
- CareerOneStop - Labor market and training program data
- Amazon Web Services - Cloud infrastructure
- GitHub Actions - Continuous integration and deployment
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ for New Jersey by the Department of Labor & Workforce Development
Empowering careers, strengthening communities, building New Jersey's future.