Get the Clinical Trial Portal up and running in 5 minutes.
- Node.js v18+ installed
- npm v10+ installed
- A code editor (VS Code recommended)
cd clinical-trial-portalnpm installYou need two terminal windows running simultaneously:
npm run apiThis starts json-server on http://localhost:3000
You should see:
JSON Server started on PORT :3000
Endpoints:
http://localhost:3000/trials
http://localhost:3000/participants
http://localhost:3000/visits
npm startThis starts the Angular app on http://localhost:4200
Wait for the build to complete. You should see:
Application bundle generation complete.
➜ Local: http://localhost:4200/
Navigate to: http://localhost:4200
The application will automatically open and you'll see the Clinical Trial Portal dashboard.
- Overview statistics (5 trials, 2 active, 618 participants)
- Trial status distribution chart
- Enrollment progress chart
Use the header navigation to explore:
- Dashboard - Overview and analytics
- Trials - List of all clinical trials
- Participants - Enrolled participants
- Reports - Report templates
-
View Trial List
- Click "Trials" in the header
- See searchable, sortable table of trials
- Click on a trial name to view details
-
View Trial Details
- Click on "Cardiovascular Health Study - Phase III"
- See enrollment progress, participant list, and trial information
-
Search Trials
- On the Trials page, use the search box
- Try searching for "diabetes" or "oncology"
-
View Participants
- Click "Participants" in the header
- See all enrolled participants across trials
clinical-trial-portal/
├── src/app/
│ ├── core/ # Services and models
│ ├── shared/ # Reusable components
│ ├── features/ # Feature modules
│ │ ├── dashboard/
│ │ ├── trials/
│ │ ├── participants/
│ │ └── reports/
│ └── app.routes.ts # Routing configuration
├── db.json # Mock API data
└── README.md # Full documentation
src/app/core/models/trial.model.ts- Trial data structuresrc/app/core/models/participant.model.ts- Participant data structure
src/app/core/services/trial.service.ts- Trial CRUD operationssrc/app/core/services/participant.service.ts- Participant operations
src/app/features/dashboard/- Dashboard with chartssrc/app/features/trials/trial-list/- Trial list with tablesrc/app/features/trials/trial-detail/- Trial detail view
db.json- Edit this file to add/modify trial and participant data
Solution: Kill the process using port 3000
# Mac/Linux
lsof -ti:3000 | xargs kill -9
# Windows
netstat -ano | findstr :3000
taskkill /PID <PID> /FSolution: Use a different port
ng serve --port 4201Solution: Reinstall dependencies
rm -rf node_modules package-lock.json
npm installSolution: Make sure json-server is running and returning data
# Test the API
curl http://localhost:3000/trialsBoth servers support hot reload:
- Angular: Changes to
.ts,.html,.scssfiles auto-reload - json-server: Changes to
db.jsonauto-reload
- Open Chrome DevTools (F12)
- Check Console for errors
- Use Network tab to inspect API calls
- Angular Language Service
- ESLint
- Prettier
- Angular Snippets
- Read the full README.md for detailed documentation
- Check MIGRATION_GUIDE.md for Angular to React migration patterns
- Explore the code to understand Angular architecture
- Modify db.json to add your own test data
- Experiment with adding new features
# Install dependencies
npm install
# Start API server
npm run api
# Start Angular app
npm start
# Build for production
npm run build
# Run tests
npm test- Check the console for error messages
- Review the full README.md
- Examine the MIGRATION_GUIDE.md for patterns
- Look at existing components for examples
Now that you have the app running, explore:
- How components are structured
- How services manage data
- How routing works
- How Angular Material components are used
- How RxJS observables handle async data
This will give you a solid foundation for understanding the Angular-to-React migration process.
Happy coding! 🚀