Background:
Summer break. I decided to build a my very first web app that focuses on Spotify, that performs data analysis by making use of it's Developer API. Most of already exisitng projects out there use either Python or Javascript to serve the backend hence I thought it will be challenging to use Java instead. This project has served me well as it introduced new concepts related to full stack development which I aim to do in the future.
test.mov
Some noteworthy things I have learnt are
- Fullstack development
- OAuth 2.0, Auth PKCE Flow
- Java Spring Boot & Spring MVC
- Jakarta HTTP Session management
- XSS, CRSF attacks
- RESTful API calls, interacting with Spotify Web API & understanding its limitations
- WebSockets & Long polling (Realised later on that Spotify Web API does not provide necessary endpoints)
What I can improve on:
- Software Engineering principles
- Better reusability of code
Progression
provides greater insight
Tech Stack used:
Frontend / Client
- HTML
- Tailwind CSS
- JavaScript
- ReactJS
Backend / Server
- Java 21
- Spring boot 3.2.5
- Spring MVC
Others:
- Docker / Docker Desktop
Resources:
If you would like to try this application out Follow these steps.
-
Ensure Java 21, Maven & React are all already installed before proceeding.
-
Clone the repository
git clone https://github.com/ryanmoolala/DJ-Lite.git
orgit clone [email protected]:ryanmoolala/DJ-Lite.git
-
Create A New App In Spotify Developers Console & Create app
-
Set Redirect URL to http://localhost:8080/callback
-
Copy the client-id generated for the above app along with redirect-uri and configure them in
spotifytool/src/main/java/com/example/spotifytool/AuthorizationFlowPKCE/SpotifyDetails.java
-
Copy the Redirect URL above and paste it in the same file in Step 4.
-
Open up your terminal and follow these commands:
cd spotifyclient
mvn clean install
mvn spring-boot:run
-
Open another terminal window and follow these commands:
cd frontend
npm install react-scripts
npm start
-
Remember that both terminals must be up and running (frontend & backend)
-
Frontend runs on
localhost:3000
and Backend runs onlocalhost:8080