A full-stack web application for tracking live music events and artists you've seen perform. Users can register, add artists they've seen, rate performances, and filter their concert history by various criteria.
- User Authentication: Secure registration and login system with session management
- Artist Tracking: Add artists you've seen live with details like venue, date, location, and personal rating
- Advanced Filtering: Filter your concert history by:
- Rating (1-10)
- Date range
- Country
- City
- Genre
- Dashboard: View statistics and browse your tracked artists
- Artist Database: Access to a comprehensive database of global music artists with genres and country information
- Password Management: Securely change your password
- Node.js with Express
- SQLite3 database
- bcryptjs for password hashing
- CORS for cross-origin resource sharing
- React 18
- React Router for navigation
- CSS3 for styling
The application uses SQLite with the following main tables:
users- User accountsuser_profiles- Extended user profile informationuser_sessions- Session managementartists- Global artists databaseartist_genres- Artist genre associationsuser_artist_tracking- User's tracked concert experiences
Before you begin, ensure you have the following installed:
- Node.js (version 14 or higher)
- npm (comes with Node.js)
- Python 3 (for database setup scripts)
-
Clone the repository
git clone <repository-url> cd DatabasesProject
-
Install dependencies
npm install
-
Database Setup
The database file
music_artists.dbshould already be included in the project. If you need to recreate it or populate it with data, you can use the Python scripts included:# Create and populate the artists database from CSV python csv_to_music_tracker_sql.py # (Optional) Populate with fake users for testing python populate_fake_users.py
You have several options to run the application:
Terminal 1 - Start the backend server:
npm run serverThe backend will start on http://localhost:3001
Terminal 2 - Start the frontend:
npm startThe frontend will start on http://localhost:3000
npm run devThis will start both the frontend and backend simultaneously.
npm startnpm start- Runs the React frontend in development modenpm run server- Starts the Express backend servernpm run dev- Runs both frontend and backend concurrentlynpm run build- Builds the frontend for productionnpm test- Runs frontend testsnpm run eject- Ejects from Create React App (one-way operation)
-
Register an Account
- Navigate to
http://localhost:3000 - Click "Register" and create a new account
- Provide email, password, first name, last name, and nickname
- Navigate to
-
Login
- Use your credentials to log in
- Session tokens are stored in localStorage
-
Add Artists
- Navigate to the Artist Tracker page
- Search for artists from the database
- Add details about when and where you saw them
- Rate your experience (1-10)
-
View Dashboard
- See statistics about your concert history
- Filter by rating, date, location, or genre
- View all your tracked artists
-
Manage Account
- Change your password from the settings page
POST /api/register- Create a new user accountPOST /api/login- Login and create sessionPOST /api/logout- Logout and invalidate sessionPOST /api/validate-session- Validate an active session
GET /api/user/:userId/sessions- Get user's active sessionsPOST /api/user/:userId/change-password- Change user passwordGET /api/user/:userId/artists- Get user's tracked artistsPOST /api/user/:userId/artists- Add artist to user's tracking list
GET /api/search/artists?query=<search>- Search for artistsGET /api/search/genres?query=<search>- Get available genresGET /api/search/countries?query=<search>- Get available countriesGET /api/artists/:artistId- Get specific artist detailsGET /api/artists/:artistId/fans- Get users who have seen an artist
GET /api/health- Server health check
DatabasesProject/
├── src/ # React frontend source
│ ├── components/ # React components
│ │ ├── LandingPage.js # Landing page
│ │ ├── LoginPage.js # Login page
│ │ ├── RegisterPage.js # Registration page
│ │ ├── Dashboard.js # Main dashboard with filters
│ │ ├── ArtistTracker.js # Add artists page
│ │ ├── MyArtists.js # View tracked artists
│ │ ├── ChangePassword.js # Password change page
│ │ └── SearchableDropdown.js # Reusable search component
│ ├── App.js # Main app component with routing
│ ├── index.js # React entry point
│ └── *.css # Component styles
├── public/ # Public assets
├── server.js # Express backend server
├── music_artists.db # SQLite database
├── package.json # Node dependencies and scripts
└── *.py # Python database setup scripts
csv_to_music_tracker_sql.py- Import artist data from CSVcsv_to_sql_artists.py- Alternative artist import scriptpopulate_fake_users.py- Generate test usersupdate_user_profiles.py- Update user profile datacomplete_user_profiles.py- Complete user profile informationadd_ratings_to_existing.py- Add ratings to existing recordsupdate_event_country_and_add_artists.py- Update event countries
If port 3001 or 3000 is already in use:
# Find and kill the process using the port (macOS/Linux)
lsof -ti:3001 | xargs kill
lsof -ti:3000 | xargs killIf you encounter database errors:
- Ensure
music_artists.dbexists in the project root - Check file permissions
- Try recreating the database using the Python scripts
If you get module errors:
rm -rf node_modules package-lock.json
npm installThe React app uses hot reloading, so changes will automatically reflect in the browser.
Restart the server after making changes to server.js:
npm run server- Password hashing with bcryptjs
- Session-based authentication with expiration
- SQL injection prevention through parameterized queries
- CORS protection
- Secure password requirements
Potential features to add:
- Photo uploads for concert memories
- Social features (follow other users)
- Concert recommendations
- Export functionality
- Mobile responsive design improvements
- Artist pages with detailed information
- Concert calendar integration
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is for educational purposes.
For questions or issues, please open an issue in the repository.