From 57d584b3f421e8c0ef5c77cdca68807b5f57d4fd Mon Sep 17 00:00:00 2001 From: siddhikasavant Date: Wed, 23 Jul 2025 14:37:57 +0530 Subject: [PATCH 1/4] updated read.me file --- README.md | 124 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 70 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index c9f367b..76d28e0 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,62 @@ -🎡Music Tracker API -A simple Node.js + SQLite3 project to manage a list of songs using RESTful APIs. Optionally includes a basic frontend to interact with the API. - -πŸ“ Project Structure -πŸ“¦ Music Tracker API -β”œβ”€β”€ controllers/ -β”‚ └── songController.js -β”œβ”€β”€ routes/ -β”‚ └── songRoutes.js -β”œβ”€β”€ db.js -β”œβ”€β”€ music.db -β”œβ”€β”€ server.js -β”œβ”€β”€ MusicAPI.html (optional frontend) -└── README.md - -πŸ“Œ Features -βœ… Create, Read songs using API -βœ… Local database using SQLite -βœ… Integrated with DB Browser for SQLite +## 🎡Music Tracker API + +A local RESTful API which is made by using Node.js, Express.js and SQLite3 that allows users to manage a list of songs and playlists. We can perform tasks like creating,viewing and playing a song, as well as creating, viewing and running a playlist. Optionally includes a basic frontend to interact with the API. + +## πŸ“ Project Structure + +πŸ“ MusicTrackerAPI +β”œβ”€β”€ _tests/ +β”‚ β”œβ”€β”€ api/ +β”‚ β”œβ”€β”€ integration/ +β”‚ └── unit/ # All test files for different layers +β”œβ”€β”€ controllers/ +β”‚ └── songController.js # Handles song-related logic +β”œβ”€β”€ routes/ +β”‚ └── songRoutes.js # Defines API endpoints for songs/playlists +β”œβ”€β”€ music.db # SQLite3 database file +β”œβ”€β”€ db.js # Database connection setup +β”œβ”€β”€ server.js # Entry point for the Express server +β”œβ”€β”€ MusicAPI.html # Optional HTML frontend +β”œβ”€β”€ package.json # Project dependencies and scripts +β”œβ”€β”€ coverage/ # Auto-generated test coverage reports +β”œβ”€β”€ .github/workflows/ # GitHub CI/CD workflow config +β”œβ”€β”€ appss.png, appss2.png # Screenshots / image assets +└── README.md # Project documentation + +## πŸ“Œ Features + +βœ… Create, view and play songs and playlists using API +βœ… Local database using SQLite3 +βœ… Integrated with DB Browser for SQLite3 βœ… HTML frontend (optional) +βœ… Backend using Node.js and Express.js βœ… Fully local setup β€” no external APIs used -πŸš€ How to Run This Project +## πŸš€ How to Run This Project + 1. πŸ“₯ Clone the Repository - bash - git clone https://github.com/your-username/music-tracker-api.git - cd music-tracker-api + `git clone https://github.com/your-username/music-tracker-api.git` + `cd music-tracker-api` 2. πŸ“¦ Install Dependencies - Make sure you have Node.js installed, then: - bash - npm install + Node.js (v14 or above) +β†’ Required to run the backend server. + npm (Node Package Manager) + `npm install` +β†’ Comes with Node.js. Used to install project dependencies. 3. βœ… Start the Server - bash - node server.js + Run this command : + `node server.js` The server will start at: http://localhost:5000 -🧠 API Endpoints +## 🧠 API Endpoints + GET /api/songs Returns all songs in the database. Response: -json +```json { "id": 1, @@ -49,42 +64,48 @@ json "artist": "Tester", "genre": "Rock" } - +``` POST /api/songs Adds a new song to the database. Request Body: -json +```json { "title": "Shape of You", "artist": "Ed Sheeran", "genre": "Pop" } +``` Response: -json +```json { "id": 2, "title": "Shape of You", "artist": "Ed Sheeran", "genre": "Pop" } +``` + +## πŸ—ƒοΈ Database Used -πŸ—ƒοΈ Database Used πŸ“Œ SQLite Database File: music.db πŸŽ›οΈ Managed Using: DB Browser for SQLite πŸ› οΈ Tables are auto-created on server start (via db.js) -🎼 Table Schema: -sql +## 🎼 Table Schema: + +```sql CREATE TABLE IF NOT EXISTS songs ( id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT, artist TEXT, genre TEXT ); +``` + +## 🌐 Frontend -🌐 Frontend You can open the MusicAPI.html file directly in your browser: πŸ”— Features: 1.Add a song using a form @@ -94,32 +115,27 @@ To use: 2.Double-click MusicAPI.html to open it in your browser. 3.Fill in the form and click β€œAdd Song”. -πŸ“¬ Sample curl Requests -Add a Song: -bash +## πŸ“¬ Sample curl Requests + +* Add a Song: +Do: +```bash curl -X POST http://localhost:5000/api/songs \ -H "Content-Type: application/json" \ -d "{\"title\":\"Test Song\", \"artist\":\"Tester\", \"genre\":\"Rock\"}" -Get All Songs: -bash + +* Get All Songs: +```bash curl http://localhost:5000/api/songs -πŸ›  Built With +## πŸ›  Built With + 1.Node.js 2.Express.js 3.SQLite3 4.[HTML/CSS/JS] for frontend -πŸ“„ License -This project is open-source and free to use. Feel free to fork and modify for learning or improvement! - - - - - - - - - +## πŸ“„ License +This project is open-source and free to use. Feel free to fork and modify for learning or improvement! From 9a87294d3399936890a6724c1bcf469676e55aae Mon Sep 17 00:00:00 2001 From: siddhikasavant Date: Wed, 23 Jul 2025 14:45:19 +0530 Subject: [PATCH 2/4] updated read.me file --- README.md | 112 +++++++++++++++++++++++++++--------------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 76d28e0..fd27141 100644 --- a/README.md +++ b/README.md @@ -8,29 +8,30 @@ A local RESTful API which is made by using Node.js, Express.js and SQLite3 that β”œβ”€β”€ _tests/ β”‚ β”œβ”€β”€ api/ β”‚ β”œβ”€β”€ integration/ -β”‚ └── unit/ # All test files for different layers +β”‚ └── unit/ β”œβ”€β”€ controllers/ -β”‚ └── songController.js # Handles song-related logic +β”‚ └── songController.js β”œβ”€β”€ routes/ -β”‚ └── songRoutes.js # Defines API endpoints for songs/playlists -β”œβ”€β”€ music.db # SQLite3 database file -β”œβ”€β”€ db.js # Database connection setup -β”œβ”€β”€ server.js # Entry point for the Express server -β”œβ”€β”€ MusicAPI.html # Optional HTML frontend -β”œβ”€β”€ package.json # Project dependencies and scripts -β”œβ”€β”€ coverage/ # Auto-generated test coverage reports -β”œβ”€β”€ .github/workflows/ # GitHub CI/CD workflow config -β”œβ”€β”€ appss.png, appss2.png # Screenshots / image assets -└── README.md # Project documentation - +β”‚ └── songRoutes.js +β”œβ”€β”€ music.db +β”œβ”€β”€ db.js +β”œβ”€β”€ server.js +β”œβ”€β”€ MusicAPI.html +β”œβ”€β”€ package.json +β”œβ”€β”€ coverage/ +β”œβ”€β”€ .github/workflows/ +β”œβ”€β”€ appss.png +β”œβ”€β”€ appss2.png +└── README.md + ## πŸ“Œ Features -βœ… Create, view and play songs and playlists using API -βœ… Local database using SQLite3 -βœ… Integrated with DB Browser for SQLite3 -βœ… HTML frontend (optional) -βœ… Backend using Node.js and Express.js -βœ… Fully local setup β€” no external APIs used +βœ… Create, view and play songs and playlists using API +βœ… Local database using SQLite3 +βœ… Integrated with DB Browser for SQLite3 +βœ… HTML frontend (optional) +βœ… Backend using Node.js and Express.js +βœ… Fully local setup β€” no external APIs used ## πŸš€ How to Run This Project @@ -39,23 +40,23 @@ A local RESTful API which is made by using Node.js, Express.js and SQLite3 that `cd music-tracker-api` 2. πŸ“¦ Install Dependencies - Node.js (v14 or above) -β†’ Required to run the backend server. - npm (Node Package Manager) - `npm install` -β†’ Comes with Node.js. Used to install project dependencies. - -3. βœ… Start the Server - Run this command : - `node server.js` - The server will start at: - http://localhost:5000 + Node.js (v14 or above) +β†’ Required to run the backend server. + npm (Node Package Manager) + `npm install` +β†’ Comes with Node.js. Used to install project dependencies. + +3. βœ… Start the Server + Run this command : + `node server.js` + The server will start at: + http://localhost:5000 ## 🧠 API Endpoints -GET /api/songs -Returns all songs in the database. -Response: +GET /api/songs +Returns all songs in the database. +Response: ```json { @@ -66,9 +67,9 @@ Response: } ``` -POST /api/songs -Adds a new song to the database. -Request Body: +POST /api/songs +Adds a new song to the database. +Request Body: ```json { "title": "Shape of You", @@ -89,9 +90,9 @@ Response: ## πŸ—ƒοΈ Database Used -πŸ“Œ SQLite Database File: music.db -πŸŽ›οΈ Managed Using: DB Browser for SQLite -πŸ› οΈ Tables are auto-created on server start (via db.js) +πŸ“Œ SQLite Database File: music.db +πŸŽ›οΈ Managed Using: DB Browser for SQLite +πŸ› οΈ Tables are auto-created on server start (via db.js) ## 🎼 Table Schema: @@ -106,36 +107,35 @@ CREATE TABLE IF NOT EXISTS songs ( ## 🌐 Frontend -You can open the MusicAPI.html file directly in your browser: -πŸ”— Features: - 1.Add a song using a form - 2.View all songs in a list -To use: - 1.Make sure the server is running. - 2.Double-click MusicAPI.html to open it in your browser. - 3.Fill in the form and click β€œAdd Song”. +You can open the MusicAPI.html file directly in your browser: +πŸ”— Features: + 1.Add a song using a form + 2.View all songs in a list +To use: + 1.Make sure the server is running. + 2.Double-click MusicAPI.html to open it in your browser. + 3.Fill in the form and click β€œAdd Song”. ## πŸ“¬ Sample curl Requests -* Add a Song: -Do: +Add a Song: ```bash curl -X POST http://localhost:5000/api/songs \ -H "Content-Type: application/json" \ -d "{\"title\":\"Test Song\", \"artist\":\"Tester\", \"genre\":\"Rock\"}" -* Get All Songs: +Get All Songs: ```bash curl http://localhost:5000/api/songs ## πŸ›  Built With -1.Node.js -2.Express.js -3.SQLite3 -4.[HTML/CSS/JS] for frontend +1.Node.js +2.Express.js +3.SQLite3 +4.[HTML/CSS/JS] for frontend -## πŸ“„ License +## πŸ“„ License -This project is open-source and free to use. Feel free to fork and modify for learning or improvement! +This project is open-source and free to use. Feel free to fork and modify for learning or improvement! From e8227715726fd3149f2517052a876fdc622d751b Mon Sep 17 00:00:00 2001 From: siddhikasavant Date: Wed, 23 Jul 2025 19:52:31 +0530 Subject: [PATCH 3/4] updated readme file! --- README.md | 78 +++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index fd27141..689140d 100644 --- a/README.md +++ b/README.md @@ -26,36 +26,36 @@ A local RESTful API which is made by using Node.js, Express.js and SQLite3 that ## πŸ“Œ Features -βœ… Create, view and play songs and playlists using API -βœ… Local database using SQLite3 -βœ… Integrated with DB Browser for SQLite3 -βœ… HTML frontend (optional) -βœ… Backend using Node.js and Express.js -βœ… Fully local setup β€” no external APIs used +βœ… Create, view and play songs and playlists using API
+βœ… Local database using SQLite3
+βœ… Integrated with DB Browser for SQLite3
+βœ… HTML frontend (optional)
+βœ… Backend using Node.js and Express.js
+βœ… Fully local setup β€” no external APIs used
## πŸš€ How to Run This Project 1. πŸ“₯ Clone the Repository - `git clone https://github.com/your-username/music-tracker-api.git` + `git clone https://github.com/your-username/music-tracker-api.git`
`cd music-tracker-api` 2. πŸ“¦ Install Dependencies - Node.js (v14 or above) -β†’ Required to run the backend server. - npm (Node Package Manager) - `npm install` -β†’ Comes with Node.js. Used to install project dependencies. - -3. βœ… Start the Server - Run this command : - `node server.js` - The server will start at: - http://localhost:5000 + Node.js (v14 or above)
+β†’ Required to run the backend server.
+ npm (Node Package Manager)
+ `npm install`
+β†’ Comes with Node.js. Used to install project dependencies.
+ +3. βœ… Start the Server
+ Run this command :
+ `node server.js`
+ The server will start at:
+ http://localhost:5000
## 🧠 API Endpoints -GET /api/songs -Returns all songs in the database. +GET /api/songs
+Returns all songs in the database.
Response: ```json @@ -67,8 +67,8 @@ Response: } ``` -POST /api/songs -Adds a new song to the database. +POST /api/songs
+Adds a new song to the database.
Request Body: ```json { @@ -90,9 +90,9 @@ Response: ## πŸ—ƒοΈ Database Used -πŸ“Œ SQLite Database File: music.db -πŸŽ›οΈ Managed Using: DB Browser for SQLite -πŸ› οΈ Tables are auto-created on server start (via db.js) +πŸ“Œ SQLite Database File: music.db
+πŸŽ›οΈ Managed Using: DB Browser for SQLite
+πŸ› οΈ Tables are auto-created on server start (via db.js)
## 🎼 Table Schema: @@ -107,22 +107,22 @@ CREATE TABLE IF NOT EXISTS songs ( ## 🌐 Frontend -You can open the MusicAPI.html file directly in your browser: -πŸ”— Features: - 1.Add a song using a form - 2.View all songs in a list -To use: - 1.Make sure the server is running. - 2.Double-click MusicAPI.html to open it in your browser. - 3.Fill in the form and click β€œAdd Song”. +You can open the MusicAPI.html file directly in your browser:
+πŸ”— Features:
+ 1.Add a song using a form
+ 2.View all songs in a list
+To use:
+ 1.Make sure the server is running.
+ 2.Double-click MusicAPI.html to open it in your browser.
+ 3.Fill in the form and click β€œAdd Song”.
## πŸ“¬ Sample curl Requests Add a Song: ```bash curl -X POST http://localhost:5000/api/songs \ - -H "Content-Type: application/json" \ - -d "{\"title\":\"Test Song\", \"artist\":\"Tester\", \"genre\":\"Rock\"}" + -H "Content-Type: application/json" \ + -d "{\"title\":\"Test Song\", \"artist\":\"Tester\", \"genre\":\"Rock\"}" Get All Songs: @@ -131,10 +131,10 @@ curl http://localhost:5000/api/songs ## πŸ›  Built With -1.Node.js -2.Express.js -3.SQLite3 -4.[HTML/CSS/JS] for frontend +1.Node.js
+2.Express.js
+3.SQLite3
+4.[HTML/CSS/JS] for frontend
## πŸ“„ License From b65281c298683f16fa7afc28454b2d0082abd272 Mon Sep 17 00:00:00 2001 From: siddhikasavant Date: Wed, 23 Jul 2025 19:59:25 +0530 Subject: [PATCH 4/4] updated readme file! --- README.md | 58 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 689140d..9126fdb 100644 --- a/README.md +++ b/README.md @@ -107,35 +107,43 @@ CREATE TABLE IF NOT EXISTS songs ( ## 🌐 Frontend -You can open the MusicAPI.html file directly in your browser:
-πŸ”— Features:
- 1.Add a song using a form
- 2.View all songs in a list
-To use:
- 1.Make sure the server is running.
- 2.Double-click MusicAPI.html to open it in your browser.
- 3.Fill in the form and click β€œAdd Song”.
- -## πŸ“¬ Sample curl Requests - -Add a Song: -```bash -curl -X POST http://localhost:5000/api/songs \ - -H "Content-Type: application/json" \ - -d "{\"title\":\"Test Song\", \"artist\":\"Tester\", \"genre\":\"Rock\"}" +You can easily run the frontend by opening the MusicAPI.html file in your browser.
+πŸ”§ Features:
+🎡 Add a song using a simple form
+πŸ“‹ View all added songs in a list
+ +## πŸš€ How to Use: +Make sure your server is running (node server.js)
+Double-click on MusicAPI.html to open it in your browser
+Fill out the form and hit β€œAdd Song” to submit 🎢
-Get All Songs: +## Sample curl Requests +* 🎡 Add a New Song +```bash +Copy +Edit +curl -X POST http://localhost:5000/api/songs \ + -H "Content-Type: application/json" \ + -d '{ + "title": "Test Song", + "artist": "Tester", + "genre": "Rock" + }' +``` +* Get All Songs: ```bash curl http://localhost:5000/api/songs +``` +## πŸ› οΈ Built With
-## πŸ›  Built With - -1.Node.js
-2.Express.js
-3.SQLite3
-4.[HTML/CSS/JS] for frontend
+- 🟩 **Node.js** – For backend JavaScript runtime
+- πŸš‚ **Express.js** – Web framework to handle routes and APIs
+- πŸ—ƒ **SQLite3** – Lightweight database for storage
+- 🌐 **HTML/CSS/JavaScript** – To power the frontend UI
-## πŸ“„ License +## πŸ“„ License
-This project is open-source and free to use. Feel free to fork and modify for learning or improvement! +This project is **open-source** and free to use!
+Feel free to **fork it**, **play around**, or even use it to build something cooler.
+Just don’t forget to give credit if you’re vibing with it πŸ’«