Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
634f31c
Whitespace
Jstrine09 Apr 6, 2026
fa0ebf1
Renamed test files
Jstrine09 Apr 6, 2026
635d38b
Changed Name
Zoedayz Apr 6, 2026
78290e8
Branch and Port fixes
Jstrine09 Apr 6, 2026
9cd019e
Changed Server port
Zoedayz Apr 6, 2026
a7ab228
Markdown Support
Jstrine09 Apr 8, 2026
cf48dfd
Message file and Message controller file
Jstrine09 Apr 8, 2026
418a6c4
Html files for messages
Jstrine09 Apr 8, 2026
d721271
Whitespace
Jstrine09 Apr 8, 2026
552af70
Simple security
Jstrine09 Apr 8, 2026
cb7934a
changes
josemcastillo7 Apr 8, 2026
20753e7
Merge pull request #59 from josemcastillo7/Joseph
josemcastillo7 Apr 8, 2026
9f0029c
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
Jstrine09 Apr 8, 2026
d762bab
userProfileRepository
Jstrine09 Apr 8, 2026
0446d27
Checkpoint
Jstrine09 Apr 9, 2026
eaf6e33
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
Zoedayz Apr 9, 2026
c0f99e2
Merge pull request #64 from josemcastillo7/Mahala-Branch
josemcastillo7 Apr 9, 2026
e213aed
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
Jstrine09 Apr 9, 2026
c150381
Fixed crash option from Null result
Jstrine09 Apr 9, 2026
7ece62e
Delete Extra File
Zoedayz Apr 9, 2026
a8a3584
reactions by nishat
Nishatlabiba98 Apr 9, 2026
32cb2b3
Merge pull request #65 from josemcastillo7/nishat
josemcastillo7 Apr 9, 2026
d9cc747
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
Jstrine09 Apr 9, 2026
8a75262
Edits to Forum files
Jstrine09 Apr 9, 2026
da5f7de
Forum controller work
Jstrine09 Apr 9, 2026
a56aabb
Updates to button
Zoedayz Apr 9, 2026
f0798e2
Line changes
Jstrine09 Apr 9, 2026
efeed89
Merge branch 'main' into Mahala-Branch
josemcastillo7 Apr 9, 2026
7f5d3c2
Merge pull request #66 from josemcastillo7/Mahala-Branch
josemcastillo7 Apr 9, 2026
b48f8ce
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
Jstrine09 Apr 9, 2026
ea249fe
ForumController bugs fixes
Jstrine09 Apr 9, 2026
5ed56bc
Frontend stuff
Jstrine09 Apr 9, 2026
6156dbf
Updated Frontend
Jstrine09 Apr 9, 2026
ea5fdbb
Merge pull request #67 from josemcastillo7/JamesBranch
josemcastillo7 Apr 9, 2026
ebabe2c
Comment Update
Zoedayz Apr 9, 2026
ddf52be
Merge pull request #68 from josemcastillo7/Mahala-Branch
Zoedayz Apr 9, 2026
905b082
w
josemcastillo7 Apr 9, 2026
1b3e9ec
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
josemcastillo7 Apr 9, 2026
0e5c58f
Media Markdown
Zoedayz Apr 9, 2026
009918b
settings
josemcastillo7 Apr 10, 2026
ebcd9f0
Docker File Additions
Jstrine09 Apr 10, 2026
1b81d74
Minor Markdown stuff
Jstrine09 Apr 10, 2026
a425040
Merge pull request #71 from josemcastillo7/JamesBranch
josemcastillo7 Apr 10, 2026
1cc78df
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
josemcastillo7 Apr 10, 2026
65f36e2
reactions are back
Nishatlabiba98 Apr 10, 2026
89f4dac
Merge pull request #72 from josemcastillo7/nishat
josemcastillo7 Apr 10, 2026
a9db4fe
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
Zoedayz Apr 10, 2026
a0ee04c
final
Nishatlabiba98 Apr 10, 2026
be40121
PostGreSQL change
Jstrine09 Apr 10, 2026
d3c6c42
Merge pull request #73 from josemcastillo7/JamesBranch
josemcastillo7 Apr 10, 2026
7e61951
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
Zoedayz Apr 10, 2026
3afd2fa
resolve dockerfile and docker-compose conflicts — use team postgres s…
Nishatlabiba98 Apr 11, 2026
c38e3d0
XO edits
Jstrine09 Apr 11, 2026
e3c4ef1
Merge pull request #74 from josemcastillo7/nishat
josemcastillo7 Apr 11, 2026
a8fe803
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
Jstrine09 Apr 11, 2026
0530d70
Checkpoint
Jstrine09 Apr 11, 2026
c6331fb
Merge pull request #75 from josemcastillo7/JamesBranch
josemcastillo7 Apr 11, 2026
674702f
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
Zoedayz Apr 11, 2026
9fc10b6
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
josemcastillo7 Apr 11, 2026
d5ab0a4
Merge pull request #76 from josemcastillo7/Joseph
josemcastillo7 Apr 11, 2026
60a65e0
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
Zoedayz Apr 11, 2026
a31b8e2
Bio, Email, and Change PW
Zoedayz Apr 11, 2026
fcc0fa5
Tables, strikethrough, task list and autolink. Changed layout
Zoedayz Apr 12, 2026
3e903e0
Merge pull request #86 from josemcastillo7/Mahala-Branch
Zoedayz Apr 12, 2026
5d8da9d
Revert local host
Zoedayz Apr 12, 2026
cfb2146
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
Zoedayz Apr 12, 2026
342a9e6
Merge pull request #89 from josemcastillo7/Mahala-Branch
josemcastillo7 Apr 12, 2026
cd2ff5a
merged
Nishatlabiba98 Apr 12, 2026
c69959d
banned
josemcastillo7 Apr 12, 2026
8cf93dd
Merge pull request #90 from josemcastillo7/Joseph
josemcastillo7 Apr 12, 2026
d8784b5
Moderator permissions
Jstrine09 Apr 12, 2026
5d9edb4
Mod Permissions 2
Jstrine09 Apr 12, 2026
6c1b1f5
Merge pull request #91 from josemcastillo7/JamesBranch
josemcastillo7 Apr 12, 2026
91cf1b3
forumcontroller and sec config
Nishatlabiba98 Apr 12, 2026
47d9d12
Minor Change
Jstrine09 Apr 12, 2026
a0effcb
add @EnableMethodSecurity and moderation routes to controller
Nishatlabiba98 Apr 12, 2026
bbfa6a2
Merge pull request #92 from josemcastillo7/nishat
josemcastillo7 Apr 12, 2026
4d1403c
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
Jstrine09 Apr 12, 2026
448b08c
Create Delete and Edir
Zoedayz Apr 12, 2026
669daef
Merge pull request #93 from josemcastillo7/Mahala-Branch
josemcastillo7 Apr 12, 2026
1d73c6d
Merge branch 'main' of https://github.com/josemcastillo7/Stardust int…
Jstrine09 Apr 12, 2026
e519e6c
Settings
Jstrine09 Apr 12, 2026
5609437
Fixed
Jstrine09 Apr 12, 2026
c14ef35
Merge pull request #94 from josemcastillo7/JamesBranch
josemcastillo7 Apr 12, 2026
fe5fd16
Tabs change
Zoedayz Apr 13, 2026
5c70aed
Media Changes
Zoedayz Apr 13, 2026
e890948
Debug Controllers 1
Zoedayz Apr 13, 2026
1013e3c
Message Markdown
Zoedayz Apr 13, 2026
1d9edf4
Error reduction
Zoedayz Apr 13, 2026
53cb374
Merge pull request #95 from josemcastillo7/Mahala-Branch
Zoedayz Apr 13, 2026
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
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"java.configuration.updateBuildConfiguration": "interactive",
"java.compile.nullAnalysis.mode": "automatic"
}
Binary file added Stardust.db
Binary file not shown.
5 changes: 5 additions & 0 deletions cookies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

#HttpOnly_localhost FALSE / FALSE 0 JSESSIONID DB5849AC053301B7D9FEDABF995B3D34
12 changes: 12 additions & 0 deletions java/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Build stage
FROM maven:3.9-eclipse-temurin-17 AS builder
WORKDIR /app
COPY pom.xml .
COPY src ./src
RUN mvn clean package -q -DskipTests
# Runtime stage
FROM eclipse-temurin:17-jre
WORKDIR /app
COPY --from=builder /app/target/Stardust-0.0.1-SNAPSHOT.jar app.jar
EXPOSE 8080
CMD ["java", "-jar", "app.jar"]
22 changes: 22 additions & 0 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,25 @@ By default, the app runs on:
- user profile/settings pages
- media embedding (image/video links)
- moderation tools and role-based controls

to run it- cd java
mvn spring-boot:run

curl -s -b cookies.txt http://localhost:5000/viewpost?post=1 | grep -o "action_react" | head -1

curl -s -o /dev/null -w "%{http_code}" -X POST \
-b cookies.txt -c cookies.txt \
-d "postId=1&type=LIKE" \
http://localhost:5000/action_react

Reaction.java
ReactionRepository
ForumService
ForumController
viewpost.html

lsof -ti :5000 | xargs kill -9 2>/dev/null && mvn spring-boot:run
9 changes: 9 additions & 0 deletions java/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
app:
build: .
ports:
- "7071:8080"
environment:
SPRING_DATASOURCE_URL: "jdbc:postgresql://xo.zipcode.rocks:9088/circus"
SPRING_DATASOURCE_USERNAME: sunflower_user
SPRING_DATASOURCE_PASSWORD: zipmusic
47 changes: 36 additions & 11 deletions java/pom.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.5</version>
<version>3.5.13</version>
<relativePath/>
</parent>

Expand Down Expand Up @@ -43,14 +43,9 @@
<artifactId>thymeleaf-extras-springsecurity6</artifactId>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.45.3.0</version>
</dependency>
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-community-dialects</artifactId>
<version>6.4.4.Final</version>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -62,6 +57,36 @@
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark</artifactId>
<version>0.22.0</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-ext-gfm-tables</artifactId>
<version>0.22.0</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-ext-gfm-strikethrough</artifactId>
<version>0.22.0</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-ext-task-list-items</artifactId>
<version>0.22.0</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-ext-autolink</artifactId>
<version>0.22.0</version>
</dependency>
<dependency>
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
<artifactId>owasp-java-html-sanitizer</artifactId>
<version>20240325.1</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.zipcode.stardust.config;

import com.zipcode.stardust.model.Subforum;
import com.zipcode.stardust.model.User;
import com.zipcode.stardust.repository.SubforumRepository;
import com.zipcode.stardust.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
Expand All @@ -13,6 +15,9 @@ public class DataInitializer implements ApplicationRunner {
@Autowired
private SubforumRepository subforumRepository;

@Autowired
private UserRepository userRepository;

@Override
public void run(ApplicationArguments args) {
if (subforumRepository.count() == 0) {
Expand All @@ -36,5 +41,13 @@ public void run(ApplicationArguments args) {
"Discuss other things here", null);
subforumRepository.save(other);
}

// Promote any existing accounts that belong to privileged usernames
for (User user : userRepository.findAll()) {
if (User.isPrivilegedUsername(user.getUsername()) && !user.isAdmin()) {
user.setAdmin(true);
userRepository.save(user);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.zipcode.stardust.config;

import com.zipcode.stardust.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.core.userdetails.UserDetailsService;
Expand All @@ -12,8 +12,11 @@
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.SecurityFilterChain;

import com.zipcode.stardust.repository.UserRepository;

@Configuration
@EnableWebSecurity
@EnableMethodSecurity
public class SecurityConfig {

@Autowired
Expand All @@ -35,10 +38,11 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.authorizeHttpRequests(auth -> auth
.requestMatchers("/", "/subforum", "/loginform", "/viewpost", "/action_login",
"/action_createaccount", "/static/**", "/style.css").permitAll()
.requestMatchers("/addpost", "/action_post", "/action_comment")
"/action_createaccount", "/static/**", "/style.css",
"/uploads/**").permitAll()
.requestMatchers("/addpost", "/action_post", "/action_comment", "/upload")
.authenticated()
.anyRequest().permitAll()
.anyRequest().authenticated()
)
.formLogin(form -> form
.loginPage("/loginform")
Expand Down
20 changes: 20 additions & 0 deletions java/src/main/java/com/zipcode/stardust/config/WebConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.zipcode.stardust.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.lang.NonNull;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {

@Value("${upload.dir:uploads}")
private String uploadDir;

@Override
public void addResourceHandlers(@NonNull ResourceHandlerRegistry registry) {
registry.addResourceHandler("/uploads/**")
.addResourceLocations("file:" + uploadDir + "/");
}
}
Loading