Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
777062c
Merge pull request #8 from jaypatel0112/harsha-persistence
harshaCorp May 6, 2024
c9a3148
Merge branch 'Milestone-2' of https://github.com/jaypatel0112/Course-…
jaypatel0112 May 6, 2024
b955df0
Merge pull request #10 from jaypatel0112/Shivangi-Course-Details-Backend
shivangi2299 May 6, 2024
1059ca6
Adding Course Description, Instructor and Student Accounts
shivangi2299 May 7, 2024
f17cba5
Merge pull request #11 from jaypatel0112/Milestone-2
shivangi2299 May 7, 2024
fa56f9c
Adding preliminary repository for rentals
AtifSiddiqui20 May 7, 2024
ed418f9
"Hopefully got rentals working"
AtifSiddiqui20 May 7, 2024
3c6825b
"Hopefully got rentals working"
AtifSiddiqui20 May 7, 2024
6c3f04c
Merge branch 'atif-profile-backend' of https://github.com/jaypatel011…
AtifSiddiqui20 May 7, 2024
8b8178c
Adding back stuff I deleted
AtifSiddiqui20 May 7, 2024
c439c19
Cleaning up some code
AtifSiddiqui20 May 7, 2024
0601f4e
Merge pull request #12 from jaypatel0112/atif-profile-backend
AtifSiddiqui20 May 7, 2024
b4b1820
Update ReadMe.md
harshaCorp May 7, 2024
b1ecc83
Rename ReadMe.md to README.md
harshaCorp May 7, 2024
bab141b
Fixed package.info file
AtifSiddiqui20 May 7, 2024
22593c5
Merge pull request #13 from jaypatel0112/atif-profile-backend
AtifSiddiqui20 May 7, 2024
7edd643
Resolved Conflicts
shivangi2299 May 7, 2024
dda4ce2
Resolved conflicts
shivangi2299 May 7, 2024
c698e2f
Resolved conflicts
shivangi2299 May 7, 2024
fc6f54d
Merge branch 'Milestone-2-Backup' of https://github.com/jaypatel0112/…
jaypatel0112 May 18, 2024
38fd22c
Adding all the html files for frontend as required
jaypatel0112 May 18, 2024
a96ac9c
Adding the required info.
jaypatel0112 May 20, 2024
a6e5850
Adding the package-info as required.
jaypatel0112 May 21, 2024
f900352
Adding the information.
jaypatel0112 May 21, 2024
ad99cd4
Adding Course Description ,student Accounts and Instrutor component
shivangi2299 May 21, 2024
2c21906
Adding Rental and UI
AtifSiddiqui20 May 21, 2024
678dfed
Added one line to package-info.java
AtifSiddiqui20 May 21, 2024
a70b7c4
Add service layer.
harshaCorp May 21, 2024
023490b
Merge pull request #20 from jaypatel0112/harsha-services
harshaCorp May 21, 2024
f1af734
Merge pull request #21 from jaypatel0112/Milestone-3
harshaCorp May 21, 2024
e351052
Adding the changes to the file in Event and CRUD method.
jaypatel0112 May 30, 2024
51c1086
Merge branch 'jay-frontend-backend' of https://github.com/jaypatel011…
jaypatel0112 May 30, 2024
12a847c
Adding the mongodb connections...
jaypatel0112 May 31, 2024
47a76e7
Adding the event sections.
jaypatel0112 May 31, 2024
46ce72c
Added the CRUD features in event section.
jaypatel0112 May 31, 2024
f77d9c5
Adding all the security configuration .
jaypatel0112 Jun 4, 2024
362a1d9
Adding TestCases and security to main branch.
jaypatel0112 Jun 9, 2024
db63e29
Course Catalog, Course Enrollment, Student Notes Sections completed
Puneeth-Talluri Jun 10, 2024
fbc4576
Commiting the required properties
jaypatel0112 Jun 10, 2024
fa2d1de
New branch so I don't mess everything up
AtifSiddiqui20 Jun 10, 2024
634cfe1
Got something working
AtifSiddiqui20 Jun 10, 2024
6419332
Commenting the changes made in event.
jaypatel0112 Jun 10, 2024
ceaac5c
Made some changes in frontend.
jaypatel0112 Jun 10, 2024
be0ce7e
Getting some stability
AtifSiddiqui20 Jun 10, 2024
c120337
Adding Test file for Login and Profile section
jaypatel0112 Jun 10, 2024
561779b
Adding logging
AtifSiddiqui20 Jun 11, 2024
5a93666
Adding unit tests
AtifSiddiqui20 Jun 11, 2024
e37e528
Deleting nonfunctioning unit tests
AtifSiddiqui20 Jun 11, 2024
c3a87c5
cleanup
AtifSiddiqui20 Jun 11, 2024
4313208
updating package-info
AtifSiddiqui20 Jun 11, 2024
69aaba1
added the unit tests to catalog and enrollments section
Puneeth-Talluri Jun 11, 2024
ed2d9ae
Merge branch 'atif-rentals-2' of https://github.com/jaypatel0112/Cour…
jaypatel0112 Jun 11, 2024
040075b
Update README.md
AtifSiddiqui20 Jun 11, 2024
33688e9
Update README.md
AtifSiddiqui20 Jun 11, 2024
671a9e8
Merge branch 'jay-frontend-backend-backup' of https://github.com/jayp…
jaypatel0112 Jun 11, 2024
0d73186
Merge branch 'Puneeth' of https://github.com/jaypatel0112/Course-Mana…
jaypatel0112 Jun 11, 2024
6d7c96d
Merge branch 'Puneeth' of https://github.com/jaypatel0112/Course-Mana…
jaypatel0112 Jun 11, 2024
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
1 change: 1 addition & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# COURSE_MANAGEMENT_SYSTEM
The objective of the Project is to develop an Application which is similar to D2L. Major sections of this App are:
1. Login / Sign-up, Events
2. Course Catalog and Enrollment Section
3. Course Detail Page
4. Student Accounts
5. Profile
6. Renting Equipment for Classes
7. Advisors Appointment

All of these Sections are Accessible from a HomePage similar to Campus Connect. The submission document for this app is located [here.](https://docs.google.com/document/d/1O24gv_99QWmvtr7fXyRh1UDozIoA5l4M_CWXlHaJSF8/edit)

# Project Members

| Member | Area |
|--------------------------------------|-------------------------------------- |
| Patel Jay Rashmitbhai | event, student, user |
| Reddy Guntaka Satish Harshavardhan | advisor, appointment |
| Puneeth Talluri | Course Catalog, Enrollment Section |
| Patel Shivangi | Course Details, Instructor, Student Accounts |
| Siddiqui Atif | Equipment, rental |





40 changes: 14 additions & 26 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,26 @@
# COURSE_MANAGEMENT_SYSTEM
The objective of the Project is to develop an Application which is similar to D2L. Major sections of this App would be:
1. Login / Sign-up
2. Course Search and Enrollment
3. Enrolled Courses
4. Course Specific Content
1. Login / Sign-up, Events
2. Course Catalog and Enrollment Section
3. Course Detail Page
4. Student Accounts
5. Profile
6. Student Resources
7. Advisors Appointment

All of these Sections will be Accessible from a HomePage similar to Campus Connect. All the sections will be displayed as Cards to select from. The prototype for this app demonstrates these features and is located [here.](https://docs.google.com/presentation/d/1QjD8G9kpWbk5O_mX6PxxExSkT-fPpU7aEpygSH_JCzo/edit?usp=sharing)

# Project Members

| Member | Area |
|--------------------------------------|--------------------------------------|
| Patel Jay Rashmitbhai | Login/Sign-up |
| Reddy Guntaka Satish Harshavardhan | Course Search (Catalog) |
| Puneeth Talluri | Enrolled Courses |
| Patel Shivangi | Course Details,Home Page |
| Siddiqui Atif | Profile |
| Member | Area |
|--------------------------------------|-------------------------------------- |
| Patel Jay Rashmitbhai | event, student, user |
| Reddy Guntaka Satish Harshavardhan | advisor, appointment |
| Puneeth Talluri | Course Catalog, Enrollment Section |
| Patel Shivangi | Course Details, Instructor, Student Accounts |
| Siddiqui Atif | Equipment, rental |


# Conflict Resolution
Participate In Zoom Meetings and discord Chat to get a vote on the issue from all team members.


# Communication Mechanism
Will meet using Zoom as per milestone requirements. Mandatory meeting the day next to class, Will decide on atleast another 2 meetings before the Milestone Due Date in this meeting.

# Decision Table

| # | Area | Decision | Alternative | Rationale |
|---|----------------------|-----------------------|-------------------------|---------------------------------------------------------------------------------------|
| 1 | IDE | Use VS Code | IntelliJ, Eclipse | Language independent editor so that it can be used in non-java course |
| 2 | Dependency Management| Maven | Gradle | All team members are familiar with the build tool |
| 3 | ORM | JPA, Hibernate | - | Need to implement this for Java Object -> Database Rows and vice versa |
| 4 | Database | H2 | MySQL | Sticking to a RDBMS which meets current requirements. Might pivot to NoSql if data asks for that |
We have expanded the scope of the project based on the suggestions by professor.


54 changes: 52 additions & 2 deletions myappvs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@
<name>myappvs</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>21</java.version>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
Expand All @@ -37,6 +41,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.mysql</groupId>
Expand Down Expand Up @@ -69,6 +78,12 @@
<version>0.11.5</version>
</dependency>

<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.1</version>
</dependency>

<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
Expand All @@ -91,8 +106,43 @@
<artifactId>postgresql</artifactId>
<version>9.4-1201-jdbc41</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<!-- Spring Boot Starter Data MongoDB -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>

<!-- Thymeleaf (if you are using Thymeleaf templates) -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.1.0</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>

</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,34 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration;
import org.springframework.context.annotation.Bean;
//import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.context.annotation.FilterType;

@SpringBootApplication
import com.CourseManagementSystem.myappvs.Notes.StudentNoteRepository;
import com.CourseManagementSystem.myappvs.event.Eventrepo;

@SpringBootApplication(scanBasePackages = {
"com.CourseManagementSystem.myappvs.event.EventController",
"com.CourseManagementSystem.myappvs.event.Eventrepository",
"com.CourseManagementSystem.myappvs.Notes.StudentNoteController",
"com.CourseManagementSystem.myappvs.Notes.StudentNoteRepository"})
@EnableMongoRepositories({"com.CourseManagementSystem.myappvs.event", "com.CourseManagementSystem.myappvs.Notes"})
@EnableJpaRepositories(excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = { Eventrepo.class, StudentNoteRepository.class}))

@ComponentScan("com.CourseManagementSystem.myappvs")
public class CourseApp {

public static void main(String[] args) {
SpringApplication.run(CourseApp.class, args);
System.out.println("Started...");
}

@Bean
public WebMvcConfigurer corsConfigurer() {
return new WebMvcConfigurer() {
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**").allowedMethods("*").allowedOrigins("*");
}
};
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.CourseManagementSystem.myappvs.Notes;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

@Data
@Getter
@Setter
@Document(collection = "student_notes")
public class StudentNote {

@Id
private String id;
private String studentEmail;
private String courseId;
private String noteTitle;
private String noteContent;


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package com.CourseManagementSystem.myappvs.Notes;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.*;

import com.CourseManagementSystem.myappvs.student.Studentrepository;

import java.util.List;

@RestController
@RequestMapping("/studentNotes")
public class StudentNoteController {

@Autowired
private StudentNoteService service;

// @Autowired
// private Studentrepository sturepo;

@GetMapping
public List<StudentNote> getNotesByStudentEmail() {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();

// Check if user is authenticated
if (authentication != null && authentication.isAuthenticated()) {
// Extract user email from authentication principal
String emailId = authentication.getName();

return service.getNotesByStudentEmail(emailId);
}
return null;
}

@GetMapping("/{studentEmail}/{courseId}")
public List<StudentNote> getNotesByStudentEmailAndCourseId(@PathVariable String studentEmail, @PathVariable String courseId) {
return service.getNotesByStudentEmailAndCourseId(studentEmail, courseId);
}

@PostMapping
public StudentNote addOrUpdateStudentNote(@RequestBody StudentNote studentNote) {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();

if (authentication != null && authentication.isAuthenticated()) {
String emailId = authentication.getName();
studentNote.setStudentEmail(emailId);
}
return service.addOrUpdateStudentNote(studentNote);
}

@DeleteMapping("/{id}")
public void deleteStudentNoteById(@PathVariable String id) {
service.deleteStudentNoteById(id);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.CourseManagementSystem.myappvs.Notes;

import org.springframework.data.mongodb.repository.MongoRepository;
import java.util.List;

public interface StudentNoteRepository extends MongoRepository<StudentNote, String> {
List<StudentNote> findByStudentEmail(String studentEmail);
List<StudentNote> findByStudentEmailAndCourseId(String studentEmail, String courseId);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.CourseManagementSystem.myappvs.Notes;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class StudentNoteService {

@Autowired
private StudentNoteRepository repository;

public List<StudentNote> getNotesByStudentEmail(String studentEmail) {
return repository.findByStudentEmail(studentEmail);
}

public List<StudentNote> getNotesByStudentEmailAndCourseId(String studentEmail, String courseId) {
return repository.findByStudentEmailAndCourseId(studentEmail, courseId);
}

public StudentNote addOrUpdateStudentNote(StudentNote studentNote) {
return repository.save(studentNote);
}

public void deleteStudentNoteById(String id) {
repository.deleteById(id);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* This Package consists of the Student Notes section which uses MongoDB. The main functionality of this section is that it enables
* the students to create course specific notes and allows them to be managed. The various parts of this section are
*
*
* 1.StudentNote.java
* This entity represents the document storing the note Information such as Student emailId, CourseID Note Title, Note Description.
*
* 2.Catalog Controller
* The Controller class deals with GET, POST, DELETE Mapping of requests in this scenario.
*
* 3.Course Service
* THis is the service class where I make use of the repository to write the logic to fetch the data and return it.
*
* 4.Course Repository
* This is the Interface which extends MongoRepository which is used to retrieve the Students Notes from the online Mongo Atlas configured in the application.properties
*
* 5. studentNotes.html
* The HTML file contains front end code to send requests and to handle responses.
*
*
* @author Puneeth Talluri
*/
package com.CourseManagementSystem.myappvs.Notes;
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.CourseManagementSystem.myappvs;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RequestParam;
Expand All @@ -14,5 +15,10 @@ public class Testcontroller {
public String handle() {
return "This is just for fun!!";
}

// @GetMapping("/")
// public String showIndex() {
// return "index";
// }

}
Loading