A modern, full-stack web application for discovering, managing, and sharing travel trips. Built with cutting-edge technologies, Travlr combines a powerful Node.js/Express backend with an Angular-based admin dashboard.
- Trip Management: Create, edit, and delete travel trips with detailed information
- Admin Dashboard: Angular-powered administrative interface for managing trips
- User Authentication: Secure JWT-based authentication system with Passport.js
- Database Integration: MongoDB with Mongoose for robust data persistence
- Responsive Design: Mobile-friendly interface that works on all devices
- RESTful API: Well-structured API endpoints for trip and user operations
- Server-Side Rendering: Express.js with Handlebars templating for dynamic content
travlr/
βββ app_server/ # Express server with server-side rendering
β βββ controllers/ # Request handlers
β βββ routes/ # Route definitions
β βββ views/ # Handlebars templates
βββ app_api/ # RESTful API server
β βββ controllers/ # API request handlers
β βββ routes/ # API endpoints
β βββ database/ # MongoDB models and connection
βββ app_admin/ # Angular admin dashboard
β βββ src/
β βββ app/ # Angular components and services
β βββ assets/ # Static assets
βββ bin/ # Entry point
βββ data/ # Sample data
Backend:
- Node.js & Express.js
- MongoDB & Mongoose
- JWT & Passport.js for authentication
- Morgan for logging
Frontend (Admin):
- Angular
- TypeScript
- Angular CLI
Architecture:
- RESTful API design
- MVC pattern
- Server-side rendering with Handlebars
- Node.js (v14 or higher)
- npm or yarn
- MongoDB instance (local or cloud)
- Angular CLI (for development)
git clone https://github.com/nwyrwas/Full-Stack-Development.git
cd Full-Stack-Development/"Module 7 Project"npm installCreate a .env file in the root directory:
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/travlr
JWT_SECRET=your_jwt_secret_key
PORT=3000npm startThe application will be available at http://localhost:3000
cd app_admin
npm install
ng serveAdmin dashboard will be available at http://localhost:4200
POST /api/auth/login- User loginPOST /api/auth/register- User registration
GET /api/trips- Get all tripsGET /api/trips/:id- Get trip by IDPOST /api/trips- Create new trip (requires auth)PUT /api/trips/:id- Update trip (requires auth)DELETE /api/trips/:id- Delete trip (requires auth)
Travlr uses JWT (JSON Web Tokens) for secure authentication:
- Users log in with credentials
- Server returns JWT token
- Token is included in Authorization header for protected routes
- Token is validated on each request
Users Collection:
- Username
- Password (hashed)
- Created date
Trips Collection:
- Title
- Description
- Destination
- Start/End dates
- Images
- Cost
- Created by (User reference)
Run the test suite:
npm testnpm start # Start the server
npm run dev # Start with nodemon (auto-reload)
ng serve # Start Angular dev server
ng build # Build Angular projectThe project follows standard JavaScript conventions with ESLint configuration.
MongoDB Connection Issues:
- Ensure MongoDB is running:
mongod - Check MONGODB_URI in .env file
Port Already in Use:
lsof -i :3000 # Check what's using port 3000
kill -9 <PID> # Kill the processAngular Build Issues:
cd app_admin
npm cache clean --force
npm install
ng buildContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is part of the CS-465 Full-Stack Development course.
Nick Wyrwas
- GitHub: @nwyrwas
- Repository: Full-Stack-Development
For support, email or open an issue on the GitHub repository.
Happy Traveling! π΄