Skip to content
Open

done #29

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
c024019
implemented the controller to add voices
SnehalRay Jul 24, 2025
37faf64
Added brainrot
llLucidll Jul 24, 2025
960de6c
Merge branch 'development' into Alpha
llLucidll Jul 24, 2025
f0e1986
Merge pull request #18 from SnehalRay/Alpha
llLucidll Jul 24, 2025
f1e6e85
Merge pull request #19 from SnehalRay/snehal
SnehalRay Jul 24, 2025
d5fbc3b
Cook of the century: Fully working integration of video summary progr…
llLucidll Jul 26, 2025
97a9e2d
Reordered code to be more logical, fixed bugs in vid pipeline
llLucidll Jul 26, 2025
e94ab5e
objectives
SnehalRay Jul 28, 2025
9e07118
Update objectives.md
SnehalRay Jul 28, 2025
1f61591
Update objectives.md
SnehalRay Jul 28, 2025
a577ba2
changed application properties with aws rds creds to use for postgres…
SnehalRay Jul 28, 2025
d695770
Merge pull request #20 from SnehalRay/snehal
SnehalRay Jul 28, 2025
ae5d9d0
Modified summarization to integrate character mannerisms into the scr…
llLucidll Jul 28, 2025
f77b569
Modified summarization to integrate character mannerisms into the scr…
llLucidll Jul 28, 2025
143f79a
Fixed bug in Video and Text Summarize pipelines, todo on fixing the t…
llLucidll Jul 29, 2025
e8bace4
Added new landing page, Need to add more styling and do mor e testing
llLucidll Jul 30, 2025
92ce89b
Update objectives.md
llLucidll Jul 31, 2025
2630ba9
Fixed the worst bug possible in tmpfile-FFMPEG interaction. Also modi…
llLucidll Jul 31, 2025
f35f6be
Merge branch 'development' of https://github.com/SnehalRay/StudyBuddy…
llLucidll Jul 31, 2025
84890b3
Update readme.md
llLucidll Jul 31, 2025
bb3b1cb
Update objectives.md
llLucidll Jul 31, 2025
7b09633
Update objectives.md
llLucidll Jul 31, 2025
6f6ffd8
Added code for ELabs Voice Cloning
llLucidll Jul 31, 2025
29b1c75
Merge branch 'development' of https://github.com/SnehalRay/StudyBuddy…
llLucidll Jul 31, 2025
d18903a
Update objectives.md
llLucidll Jul 31, 2025
534e678
Merge pull request #21 from SnehalRay/snehal
SnehalRay Aug 1, 2025
ea04998
handled missing cookies of any form and redirection
SnehalRay Aug 1, 2025
8c7bcc9
removed unneccesary file from frontend
SnehalRay Aug 1, 2025
c8a3e3b
Merge pull request #22 from SnehalRay/snehal
SnehalRay Aug 1, 2025
cb95c1b
change in the home page
SnehalRay Aug 1, 2025
e8a70a1
changed the logic behind pricing such that you can see header when yo…
SnehalRay Aug 1, 2025
42506f0
made changes to the frontend with pricing and headers visibility to l…
SnehalRay Aug 1, 2025
d2eec7f
Merge pull request #24 from SnehalRay/snehal
SnehalRay Aug 1, 2025
9da776b
Integrated new workspace area, made minor changes in UI across the en…
llLucidll Aug 3, 2025
cb4efec
Added requirements.txt
llLucidll Aug 4, 2025
82de674
Create inshallah.md
llLucidll Aug 5, 2025
a0ce185
Update objectives.md
llLucidll Aug 5, 2025
58105b4
Update objectives.md
llLucidll Aug 5, 2025
4d39f79
Modified fastAPI code to parse through HTTP request to obtain cookie …
llLucidll Aug 5, 2025
ad1923c
Merge branch 'development' of https://github.com/SnehalRay/StudyBuddy…
llLucidll Aug 5, 2025
fcbadd7
Merge pull request #25 from SnehalRay/FrontendChanges
llLucidll Aug 5, 2025
ad5dd1d
Modified FastAPI endpoints to return Responses in the correct form fo…
llLucidll Aug 5, 2025
7d5d88c
Modified axios.ts to set up dual backend architecture. Made new api f…
llLucidll Aug 5, 2025
acec1c9
Modified all default axios instance imports to use named import to wo…
llLucidll Aug 5, 2025
741dd7e
Modified all default axios instance imports to use named import to wo…
llLucidll Aug 5, 2025
b10a328
Attempted integrating python backend with frontend, ran into error, …
llLucidll Aug 5, 2025
bb97480
folder controller function to fetch the current folder id
SnehalRay Aug 12, 2025
b13dc01
Merge pull request #26 from SnehalRay/snehal
llLucidll Aug 13, 2025
2ae161e
Updated Python backend to use new Springboot folderID returning metho…
llLucidll Aug 13, 2025
32135d7
Updated _cleanup method to log failures
llLucidll Aug 13, 2025
67aa70e
Fixed cleanup error due to lockfile
llLucidll Aug 13, 2025
cd4e9e2
Modified voices on objectives.md
llLucidll Aug 15, 2025
88b425a
Engineered a new system prompt for efficient generations
llLucidll Aug 15, 2025
89e3419
implemented selected character
SnehalRay Aug 15, 2025
6adce21
Merge pull request #27 from SnehalRay/snehal
SnehalRay Aug 15, 2025
7a9cfad
Modified the prompt to be a method and then modified it to accept a c…
llLucidll Aug 15, 2025
59b7dca
Modified the prompt to be a method and then modified it to accept a c…
llLucidll Aug 15, 2025
86aaff9
Merge branch 'development' of https://github.com/SnehalRay/StudyBuddy…
llLucidll Aug 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
File renamed without changes.
Binary file added backend/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class StudybuddyApplication {

public static void main(String[] args) {


// Load .env before Spring context starts
Dotenv dotenv = Dotenv.load();
dotenv.entries().forEach(entry ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.nio.charset.StandardCharsets;

import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;

Expand Down Expand Up @@ -197,6 +198,69 @@ public ResponseEntity<?> getAllFolders(HttpServletRequest request) {
}


/**
*
* This controller is responsible to return the current folder id
*
* */

@GetMapping("/listCurrentFolderId")
public ResponseEntity<?> getFolderFromCookie(HttpServletRequest request){
try{

// 1. Get the folderSession cookie
String folderCookie = null;
if (request.getCookies() != null) {
for (var cookie : request.getCookies()) {
if ("folderSession".equals(cookie.getName())) {
folderCookie = cookie.getValue();
break;
}
}
}

if (folderCookie == null || folderCookie.isBlank()) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body("Missing folderSession cookie.");
}

// 2. Decode it
String decoded = java.net.URLDecoder.decode(folderCookie, java.nio.charset.StandardCharsets.UTF_8);
if (!decoded.contains("#")) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body("Invalid folderSession format.");
}

String[] parts = decoded.split("#", 2);
String folderName = parts[0];
String email = parts[1];

// 3. Find user
var userOpt = userRepo.findByEmail(email);
if (userOpt.isEmpty()) {
return ResponseEntity.status(HttpStatus.UNAUTHORIZED).body("User not found for cookie.");
}

// 4. Find folder by name and owner
Optional<Folder> folderOpt = folderRepo.findByNameAndOwner(folderName, userOpt.get());
if (folderOpt.isEmpty()) {
return ResponseEntity.status(HttpStatus.NOT_FOUND).body("Folder not found.");
}

// 5. Return the folder ID (and name for convenience)
Folder folder = folderOpt.get();
return ResponseEntity.ok(Map.of(
"id", folder.getId(),
"name", folder.getName()
));



} catch (Exception e) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body("Error fetching folder from cookie: " + e.getMessage());
}
}





Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package com.postgresql.studybuddy.controller;


import com.postgresql.studybuddy.entity.VoiceCharacter;
import com.postgresql.studybuddy.repository.VoiceCharacterRepo;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequiredArgsConstructor
@RequestMapping("/voiceCharacter")
public class VoiceCharacterController {

@Autowired
VoiceCharacterRepo voiceCharacterRepo;

/**
* This is an API Request to add Voices to the website
*
* */

@PostMapping("/addVoices")
public ResponseEntity<Map<String, String>> addVoices(@RequestBody VoiceCharacter voiceCharacter){
try{

boolean voiceIdExists = voiceCharacterRepo.findByElevenLabsId(voiceCharacter.getElevenLabsId()).isPresent();

if (voiceIdExists) {
return ResponseEntity.status(HttpStatus.CONFLICT).body(Map.of("error", "Voice already exists."));
}

voiceCharacterRepo.save(voiceCharacter);

Map<String, String> response = new HashMap<>();
response.put("message", "Voice Added successful");
response.put("name", voiceCharacter.getName());
response.put("Eleven Labs Id", voiceCharacter.getElevenLabsId());

return ResponseEntity.status(HttpStatus.CREATED).body(response); //success response in json


} catch (Exception e) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(Map.of("error", "Error occurred: " + e.getMessage())); //if some other issues, then it says the error
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.postgresql.studybuddy.entity;


import jakarta.persistence.*;
import lombok.Data;

@Data
@Entity
@Table(name="characters")
public class VoiceCharacter {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;

private String name;
private String elevenLabsId;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.postgresql.studybuddy.repository;

import com.postgresql.studybuddy.entity.VoiceCharacter;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

public interface VoiceCharacterRepo extends JpaRepository<VoiceCharacter,Long> {
Optional<VoiceCharacter> findByElevenLabsId(String elevenLabsId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public SecurityFilterChain filterChain(HttpSecurity http, JwtAuthFilter jwtAuthF

.cors().and().csrf().disable()
.authorizeHttpRequests()
.requestMatchers("/signup", "/login","/logout","/verifyToken","/folder/create","/folder/open","/folder/exitFolder","/upload/files","/file/upload", "/folder/listFolders","/edit-profile","/file/listFiles").permitAll()
.requestMatchers("/signup", "/login","/logout","/verifyToken","/folder/create","/folder/open","/folder/exitFolder","/upload/files","/file/upload", "/folder/listFolders","/edit-profile","/file/listFiles","/voiceCharacter/addVoices","/folder/listCurrentFolderId").permitAll()
.anyRequest().authenticated()
.and()
.logout().disable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ spring.datasource.url = jdbc:postgresql://localhost:5432/studyBuddy
spring.datasource.username = postgres
spring.datasource.password = 1234

#spring.datasource.url = ${RDS_URL}
#spring.datasource.username = ${RDS_User}
#spring.datasource.password = ${RDS_Password}

spring.jpa.properties.hibernate,dialect = org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto = update

Expand Down
Loading