Skip to content
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": "hellow@amigoscode.com",
"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.
70 changes: 70 additions & 0 deletions src/main/java/ethniconnect_backend/Cart/AddToCartDto.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
package ethniconnect_backend.Cart;

import com.sun.istack.NotNull;
import lombok.NonNull;

public class AddToCartDto {
private int id;
private @NotNull long login_id;
private @NotNull int menu_id;
private @NotNull int quantity;

public AddToCartDto() {
}

public AddToCartDto(int id, @NotNull long login_id, @NotNull int menu_id, @NotNull int quantity) {
this.id = id;
this.login_id = login_id;
this.menu_id = menu_id;
this.quantity = quantity;
}

public AddToCartDto(Cart cart) {
this.setId(cart.getId());
this.setMenuId(cart.getMenuId());
this.setLoginId(cart.getLogin_id());
this.setQuantity(cart.getQuantity());
}

@Override
public String toString() {
return "CartDto{" +
"id=" + id +
", login_id=" + login_id +
", menu_id=" + menu_id +
", quantity=" + quantity +
",";
}

public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}

public long getLongId() {
return login_id;
}

public void setLoginId(long login_id) {
this.login_id = login_id;
}

public int getMenuId() {
return menu_id;
}

public void setMenuId(int menu_id) {
this.menu_id = menu_id;
}

public int getQuantity() {
return quantity;
}

public void setQuantity(int quantity) {
this.quantity = quantity;
}
}
Loading