Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saranya #7

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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.
33 changes: 0 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +0,0 @@
# Login Registration Backend

Complete login registration backend system using Spring Boot.

[![YouTube Video](https://user-images.githubusercontent.com/40702606/104790682-d62ac880-578f-11eb-8353-aa68739ffe42.png)](https://www.youtube.com/watch?v=QwQuro7ekvc)

- [x] Spring Boot
- [x] Spring Security
- [x] Java Mail
- [x] Email verification with expiry
- [x] Spring Boot

## Diagram
![Screenshot 2021-01-13 at 23 38 08](https://user-images.githubusercontent.com/40702606/104789980-15581a00-578e-11eb-998d-30f2e6a9f461.png)

## Email verification link with expiry
![Screenshot 2021-01-13 at 23 37 33](https://user-images.githubusercontent.com/40702606/104789893-0c674880-578e-11eb-939a-2a1cd3a8dfd2.png)

## Example requests
### Postman
![Screenshot 2021-01-13 at 23 37 57](https://user-images.githubusercontent.com/40702606/104790087-7a137480-578e-11eb-8141-307a8850c39e.png)

### CURL
```
curl --location --request POST 'localhost:8080/api/v1/registration' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstName": "Amigos",
"lastName": "Code",
"email": "[email protected]",
"password": "password"
}'
```
31 changes: 29 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
</properties>

<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
Expand All @@ -36,30 +41,52 @@
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<!--<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
</dependency>-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>

<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
Expand Down
Binary file added src/.DS_Store
Binary file not shown.
Binary file added src/main/.DS_Store
Binary file not shown.
Binary file added src/main/java/.DS_Store
Binary file not shown.
6 changes: 0 additions & 6 deletions src/main/java/com/example/demo/appuser/AppUserRole.java

This file was deleted.

40 changes: 0 additions & 40 deletions src/main/java/com/example/demo/email/EmailService.java

This file was deleted.

This file was deleted.

142 changes: 0 additions & 142 deletions src/main/java/com/example/demo/registration/RegistrationService.java

This file was deleted.

Binary file added src/main/java/ethniconnect_backend/.DS_Store
Binary file not shown.
56 changes: 56 additions & 0 deletions src/main/java/ethniconnect_backend/ChefCreateMenu/ChefMenu.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package ethniconnect_backend.ChefCreateMenu;

import ethniconnect_backend.ChefDetails.Chef;
import ethniconnect_backend.Cuisines.CuisineCategory;
import ethniconnect_backend.Order.Order;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Set;

@Data
@NoArgsConstructor
@AllArgsConstructor

@Entity
@Table(name = "chefmenu")
public class ChefMenu {
@Id
@GeneratedValue
private int id;
private long login_id;
@Enumerated(EnumType.STRING)
private MenuCategories menucategories;
//private int cuisine_id;
@Lob
@Column(columnDefinition = "MEDIUMBLOB")
private String menu_item_image;
private String item_name;
private double menu_item_price;
private String item_ingredients;
private String item_intresting_facts;
@Enumerated(EnumType.STRING)
private Week week;

//@ManyToOne
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "cuisine_id")
private CuisineCategory cuisineCategory;
@ManyToMany(mappedBy = "menu_items")
Set<Order> orders;

/* @OneToOne
@JoinColumn (name="login_id", insertable = false, updatable = false)
private Chef chef;*/
/*@JoinTable(
name = "selected_cuisines",
joinColumns = @JoinColumn(name = "menu_item_id"),
inverseJoinColumns = @JoinColumn(name = "cuisine_id"))
Set<CuisineCategories> selectedCuisines;*/
/* @OneToMany
@OneToMany(fetch = FetchType.EAGER, mappedBy = "menu_items", cascade = CascadeType.ALL)
@JsonIgnoreProperties("menu")
private List<Story> storyList = new ArrayList<>();*/
}
Loading