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
16 changes: 16 additions & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "backend",
"version": "1.0.0",
"type": "module",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^5.1.0"
}
}
36 changes: 36 additions & 0 deletions backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,42 @@ app.get("/", (req, res) => {
res.send("Hello from Express!");
});

app.post("/api/signup", (req, res) => {
res.json({ message: "User signed up successfully" });
});

app.post("/api/signin", (req, res) => {
res.json({ message: "Logged in" });
});

app.get("/api/profile", (req, res) => {
res.json({ message: "User details fetched" });
});

app.post("/api/mood", (req, res) => {
res.json({ message: "Mood recorded" });
});

app.get("/api/calendar", (req, res) => {
res.json({ message: "Calendar data retrieved" });
});

app.get("/api/conversations", (req, res) => {
res.json({ message: "Conversations fetched" });
});

app.get("/api/insights", (req, res) => {
res.json({ message: "Insights generated" });
});

app.get("/api/notifications", (req, res) => {
res.json({ message: "Notifications retrieved" });
});

app.get("/api/badges_streaks", (req, res) => {
res.json({ message: "Badges and streaks updated" });
});

app.listen(port, () => {
console.log(`Server running at http://localhost:${port}`);
});
10 changes: 10 additions & 0 deletions frontend/About.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import { View, Text } from 'react-native';

export default function About(){
return (
<View>
<Text>This is About Page</Text>
</View>
);
}
29 changes: 29 additions & 0 deletions frontend/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,40 @@
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import BadgesStreaks from './src/BadgesStreaks';
import CalendarInput from './src/CalendarInput';
import Conversations from './src/Conversations';
import Insights from './src/Insights';
import MoodInput from './src/MoodInput';
import Notifications from './src/Notifications';
import Profile from './src/Profile';
import SignIn from './src/SignIn';
import SignUp from './src/SignUp';
import About from './src/routes'
import Home from './src/routes'

const Stack = createNativeStackNavigator();
export default function App() {
return (
<View style={styles.container}>
<Text>Open up App.tsx to start working on your app!</Text>
<StatusBar style="auto" />
<NavigationContainer>
<Stack.Navigator initialRouteName="Home">
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="About" component={About} />
<Stack.Screen name="BadgesStreaks" component={BadgesStreaks} />
<Stack.Screen name="Calendar" component={CalendarInput} />
<Stack.Screen name="Conversations" component={Conversations} />
<Stack.Screen name="Insights" component={Insights} />
<Stack.Screen name="MoodInput" component={MoodInput} />
<Stack.Screen name="Notifications" component={Notifications} />
<Stack.Screen name="Profile" component={Profile} />
<Stack.Screen name="SignIn" component={SignIn} />
<Stack.Screen name="SignUp" component={SignUp} />
</Stack.Navigator>
</NavigationContainer>
</View>
);
}
Expand Down
12 changes: 12 additions & 0 deletions frontend/src/BadgesStreaks.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import { View, Text } from 'react-native';

export default function BadgesStreaks(){
return (
<View>
<Text>Badges & Streaks</Text>
<Text>Streak: 5 days</Text>
<Text>Badge: Consistent</Text>
</View>
);
}
10 changes: 10 additions & 0 deletions frontend/src/CalendarInput.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import { View, Text } from 'react-native';

export default function CalendarInput(){
return (
<View>
<Text>Calender Page</Text>
</View>
);
}
10 changes: 10 additions & 0 deletions frontend/src/Conversations.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import { View, Text } from 'react-native';

export default function Conversations(){
return (
<View>
<Text>Conversations</Text>
</View>
);
}
10 changes: 10 additions & 0 deletions frontend/src/Home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import { View, Text } from 'react-native';

export default function Home(){
return (
<View>
<Text>Home Page</Text>
</View>
);
}
13 changes: 13 additions & 0 deletions frontend/src/Insights.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import { View, Text } from 'react-native';

export default function Insights(){
return (
<View>
<Text>Insights</Text>
<Text>Days active: 12</Text>
<Text>Mood logs: 8</Text>
<Text>Top mood: Happy</Text>
</View>
);
}
10 changes: 10 additions & 0 deletions frontend/src/MoodInput.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import { View, Text } from 'react-native';

export default function MoodInput(){
return(
<View>
<Text>Mood Input Page</Text>
</View>
);
}
10 changes: 10 additions & 0 deletions frontend/src/Notifications.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import { View, Text } from 'react-native';

export default function Notifications(){
return (
<View>
<Text>Notif Page</Text>
</View>
);
}
10 changes: 10 additions & 0 deletions frontend/src/Profile.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import { View, Text } from 'react-native';

export default function Profile(){
return (
<View>
<Text>Profile Page</Text>
</View>
);
}
10 changes: 10 additions & 0 deletions frontend/src/SignIn.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import { View, Text } from 'react-native';

export default function SignIn(){
return (
<View>
<Text>Sign In Page</Text>
</View>
);
}
10 changes: 10 additions & 0 deletions frontend/src/SignUp.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import { View, Text } from 'react-native';

export default function SignUp(){
return (
<View>
<Text>Sign Up Page</Text>
</View>
);
}
20 changes: 20 additions & 0 deletions frontend/src/routes.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import React from 'react';
import { Text } from 'react-native';
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import BadgesStreaks from './BadgesStreaks';
import CalendarInput from './CalendarInput';
import Conversations from './Conversations';
import Insights from './Insights';
import MoodInput from './MoodInput';
import Notifications from './Notifications';
import Profile from './Profile';
import SignIn from './SignIn';
import SignUp from './SignUp';

const Home = () => (
<div style={{ textAlign: 'center', marginTop: '20px' }}>
Expand All @@ -19,7 +28,18 @@ const AppRoutes = () => {
<Router>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/home" element={<Home />} />
<Route path="/about" element={<About />} />
<Route path="/badges_streaks" element={<BadgesStreaks />} />
<Route path="/calendar" element={<CalendarInput />} />
<Route path="/conversations" element={<Conversations />} />
<Route path="/insights" element={<Insights />} />
<Route path="/moodinput" element={<MoodInput />} />
<Route path="/notifications" element={<Notifications />} />
<Route path="/profile" element={<Profile />} />
<Route path="/signin" element={<SignIn />} />
<Route path="/signup" element={<SignUp />} />

</Routes>
</Router>
);
Expand Down
34 changes: 19 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "backend",
"version": "1.0.0",
"description": "",
"description": "**A safe and supportive space for mental wellness.** \r Built for students, by students, this app combines the power of technology with compassion to help users manage their mental health, track progress, and connect anonymously.",
"main": "./frontend/index.ts",
"scripts": {
"dev:backend": "tsx watch backend/src/index.ts",
Expand All @@ -18,29 +18,33 @@
"dependencies": {
"@expo/webpack-config": "^19.0.1",
"@prisma/client": "^5.22.0",
"@react-native-picker/picker": "^2.11.0",
"@react-navigation/native": "^7.0.14",
"@react-navigation/native-stack": "^7.2.0",
"axios": "^1.7.7",
"expo": "~52.0.11",
"expo-status-bar": "~2.0.0",
"expo": "^53.0.7",
"expo-constants": "~17.1.5",
"expo-linking": "~7.1.4",
"expo-router": "~5.0.5",
"expo-status-bar": "~2.2.3",
"express": "^4.21.1",
"react": "18.3.1",
"react-dom": "^18.3.1",
"react-native": "0.76.3",
"react-native-web": "^0.19.13",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-native": "0.79.2",
"react-native-calendars": "^1.1310.0",
"react-native-safe-area-context": "5.4.0",
"react-native-screens": "~4.10.0",
"react-native-web": "^0.20.0",
"react-router-dom": "^7.0.1",
"tsx": "^4.19.2",
"expo-router": "~4.0.9",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.1.0",
"expo-linking": "~7.0.3",
"expo-constants": "~17.0.3"
"tsx": "^4.19.2"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/express": "^5.0.0",
"@types/node": "^22.9.3",
"@types/react": "~18.3.12",
"@types/react": "~19.0.10",
"prisma": "^5.22.0",
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
"typescript": "~5.8.3"
}
}