Skip to content

Commit a151930

Browse files
Merge pull request #9 from EdTract/refactor/components-and-styles
Refactor: Revitalize Components and Styles for Enhanced Performance and Consistency
2 parents 0845bdb + 75e8691 commit a151930

25 files changed

+521
-298
lines changed

.firebase/hosting.YnVpbGQ.cache

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
404.html,1717860215833,6537619fa0edb6a05c3fa83265461172fea2307ecff34424f323310c8c8eb4be
2-
index.html,1717860071628,6bb6ea0e768591cd3a9117e6fbb22c501828161a31109f6be8f000d5d56240e6
3-
asset-manifest.json,1717860071628,1057f43e975ac2a2626edbe1e0ee55e17837fa8f264b5df9d4756df3000b4656
4-
manifest.json,1717860058936,90ef6b7ee0341b32fddf19b4ded4c8fa09039cd428bb3518df89c01d1745eb39
5-
robots.txt,1717860058936,2544ca049f223a42bff01f72ad930a5edba75bbb7199d0f8430a02ff5aca16ec
6-
static/css/main.ddc554d1.css,1717860071640,bc50c73d9791d1434fbefd36b57b4842b001bafcf0c38b8ffbd7257841a546de
7-
static/js/453.9113e28b.chunk.js,1717860071640,9322d2f411e7661c2cb7d934b37d3d5b3c57baab6ce7055156f879e8ca8fbc4c
8-
static/css/main.ddc554d1.css.map,1717860071648,31ea6d83a0fec588d5f05f645b6a2b83dd39c01ce8a829731e8c985c6e1b5674
9-
static/js/main.488c6468.js.LICENSE.txt,1717860071644,79000665ecf6ab75ebdb74114ee1a053dede9b39ecce36c4d87a55a200ccd159
10-
static/js/453.9113e28b.chunk.js.map,1717860071644,a88471ab7a13b4d38779b385ba9be5cb694ea289b818ec528b5fabbec08d2924
11-
logo.png,1717860058936,fc0c55b3ea575ffb5690a6391f7306dd0fd0b834ad99a7b7ef1593da0d2b4b5c
12-
static/js/main.488c6468.js,1717860071648,afe6aa13efe1b49cb706d02e92dce97e1f3949bc95155b11e0b1b5a48e76860a
13-
static/js/main.488c6468.js.map,1717860071644,7f154d4c20fdfbc08130d7b94a82ca3fd20f7bf579b7d4a725f0a77e7f7cc0a4
1+
asset-manifest.json,1717906062368,265f68e2bbba2a6892be2eb328fc384936d260b45e7d5feb48a4442168c712a4
2+
index.html,1717906062368,564deb1a78ec7ffd86b5649a740aa345962f41e15dfe3f0de7bbc3da06e43270
3+
manifest.json,1717906050468,90ef6b7ee0341b32fddf19b4ded4c8fa09039cd428bb3518df89c01d1745eb39
4+
robots.txt,1717906050468,2544ca049f223a42bff01f72ad930a5edba75bbb7199d0f8430a02ff5aca16ec
5+
static/css/main.1e6d6c35.css,1717906062380,f68d731ceba0df6233c6418e7bd252ef1431bb87ce50a7b5bf8c87ba99e9303a
6+
static/css/main.1e6d6c35.css.map,1717906062380,0e6925dfafad9769cd9ffbbd1a38a9a61212c291613da807692cdef5aba4c9a5
7+
static/js/453.9113e28b.chunk.js,1717906062380,9322d2f411e7661c2cb7d934b37d3d5b3c57baab6ce7055156f879e8ca8fbc4c
8+
static/js/453.9113e28b.chunk.js.map,1717906062380,a88471ab7a13b4d38779b385ba9be5cb694ea289b818ec528b5fabbec08d2924
9+
static/js/main.4dab00a8.js.LICENSE.txt,1717906062380,c3be17e167b9804cb2586c997403b1fae9a242af6b6d99c6a69bbdafb7ffcd7a
10+
logo.png,1717906050468,fc0c55b3ea575ffb5690a6391f7306dd0fd0b834ad99a7b7ef1593da0d2b4b5c
11+
static/js/main.4dab00a8.js,1717906062380,f9c0edec35740a3abab93bb4a82a6ab99de63f81059bae0b50118a2b80edec6d
12+
static/js/main.4dab00a8.js.map,1717906062380,a6286504890d56bed2953b203c79aef4a704f67c7483dd234e507a6b236d85a4

README.md

Lines changed: 129 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,161 @@
1-
# Getting Started with Create React App
1+
# EdTract
22

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3+
EdTract is an educational platform designed to provide a safe and secure environment for students to interact, collaborate, and learn. This repository contains the frontend code for EdTract, developed using React.js, Redux, and React Router.
44

5-
## Available Scripts
5+
## Table of Contents
66

7-
In the project directory, you can run:
7+
- [EdTract](#edtract)
8+
- [Table of Contents](#table-of-contents)
9+
- [Introduction](#introduction)
10+
- [Team Details](#team-details)
11+
- [Team Members](#team-members)
12+
- [Problem Statement, Background \& Motivation, and Solution](#problem-statement-background--motivation-and-solution)
13+
- [Problem Statement](#problem-statement)
14+
- [Background \& Motivation](#background--motivation)
15+
- [Solution](#solution)
16+
- [Product Description and Product Uniqueness](#product-description-and-product-uniqueness)
17+
- [Product Description](#product-description)
18+
- [Product Uniqueness](#product-uniqueness)
19+
- [Business Model and Marketing Plan](#business-model-and-marketing-plan)
20+
- [Business Model](#business-model)
21+
- [Marketing Plan](#marketing-plan)
22+
- [Implementation Plan](#implementation-plan)
23+
- [User Scenario](#user-scenario)
24+
- [Installation](#installation)
25+
- [Usage](#usage)
26+
- [Contributing](#contributing)
27+
- [License](#license)
828

9-
### `npm start`
29+
## Introduction
1030

11-
Runs the app in the development mode.\
12-
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
31+
EdTract is an innovative EdTech solution aimed at improving the educational experience for secondary and high school students in Sri Lanka. By providing a secure and structured platform, EdTract mitigates the adverse effects of social media and promotes a more inclusive and supportive educational environment.
1332

14-
The page will reload when you make changes.\
15-
You may also see any lint errors in the console.
33+
## Team Details
1634

17-
### `npm test`
35+
- **Team Name**: CodeChefs
36+
- **University**: Informatics Institute of Technology
37+
- **Domain**: Education
38+
- **Product Name**: EdTract
1839

19-
Launches the test runner in the interactive watch mode.\
20-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
40+
### Team Members
2141

22-
### `npm run build`
42+
- **Neluki Navithma Hamangoda**
43+
44+
- Phone: 0779493696
45+
- **Manula Imantha Jayabodhi**
46+
47+
- Phone: 0766438922
48+
- **Ranuga Disansa Gamage**
49+
50+
- Phone: 0777169804
51+
- **Thasara Danidi Bavanya Surage**
52+
53+
- Phone: 0772428588
2354

24-
Builds the app for production to the `build` folder.\
25-
It correctly bundles React in production mode and optimizes the build for the best performance.
55+
## Problem Statement, Background & Motivation, and Solution
2656

27-
The build is minified and the filenames include the hashes.\
28-
Your app is ready to be deployed!
57+
### Problem Statement
2958

30-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
59+
The extensive use of social media among college students has far-reaching implications for the educational landscape. Exposure to irrelevant and harmful content impacts academic performance and emotional stability. Additionally, the unequal distribution of information within Sri Lanka limits access to quality education for marginalized students. Addressing these challenges is essential for promoting equitable opportunities and breaking the cycle of poverty.
3160

32-
### `npm run eject`
61+
### Background & Motivation
3362

34-
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
63+
During our schooling years, we lacked a specific platform to connect with our schoolmates. The COVID-19 pandemic exacerbated this issue, leading to stress and loneliness due to limited social interaction. Students turned to social media, which exposed them to negative effects like increased stress, cyberbullying, and decreased well-being. EdTract aims to provide a safer alternative for educational and extracurricular interaction.
3564

36-
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
65+
### Solution
3766

38-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
67+
EdTract is a web-based platform where students can interact with peers from different schools securely. It facilitates communication on educational matters and extracurricular activities, aiming to improve the education of 4.2 million students in Sri Lanka. The platform offers various features to foster collaboration, reduce social media usage, and bridge the digital divide.
3968

40-
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
69+
## Product Description and Product Uniqueness
4170

42-
## Learn More
71+
### Product Description
4372

44-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
73+
EdTract is a web-based interactive workspace for students, enabling collaboration through integrated chat and document sharing. Features include:
4574

46-
To learn React, check out the [React documentation](https://reactjs.org/).
75+
1. Interaction with pupils from other schools via built-in chat.
76+
2. Resource sharing through file sharing features.
77+
3. Multilingual support.
78+
4. Community building for project organization.
79+
5. Personalized event alerts via email.
80+
6. Student verification through principals.
81+
7. Teacher and parent monitoring of student activity.
82+
8. Showcasing student accomplishments.
83+
9. Role-specific student search functionality.
84+
10. An event calendar for nationwide school events.
4785

48-
### Code Splitting
86+
### Product Uniqueness
4987

50-
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
88+
EdTract stands out by offering a secure and structured environment focused on education and collaboration. Its features ensure safe interaction, monitored activities, and inclusivity through multilingual support and personalized alerts.
5189

52-
### Analyzing the Bundle Size
90+
## Business Model and Marketing Plan
5391

54-
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
92+
### Business Model
5593

56-
### Making a Progressive Web App
94+
EdTract will be available through subscription plans, both for individual students and schools. Plans include:
5795

58-
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
96+
- Monthly or annual personal subscriptions.
97+
- Affordable per-head cost for school subscriptions.
98+
- A 3-month free trial to encourage adoption.
99+
- Promotions in educational videos and collaboration with schools for awareness.
59100

60-
### Advanced Configuration
101+
### Marketing Plan
61102

62-
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
103+
Targeting students in grade 6 and upwards, the marketing plan includes:
63104

64-
### Deployment
105+
- Collaborations with education influencers and advocates.
106+
- Content marketing through educational blogs and success stories.
107+
- Workshops, discussions, and competitions to attract new users.
108+
- Gradual expansion starting from Colombo to the entire Western province and eventually nationwide and internationally.
65109

66-
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
110+
## Implementation Plan
67111

68-
### `npm run build` fails to minify
112+
1. **Design and Architecture**: Define system architecture and component interactions.
113+
2. **Frontend Development**: Develop responsive user interfaces with React.js.
114+
3. **Backend Development**: Build scalable APIs with FastAPI.
115+
4. **Database Setup**: Integrate Firebase and GCP for data storage.
116+
5. **DevOps Integration**: Automate infrastructure and deployment processes.
117+
6. **Security Implementation**: Ensure data security with OAuth 2.0, RBAC, and encryption.
118+
7. **Testing and QA**: Conduct comprehensive testing to ensure reliability and performance.
119+
8. **Deployment and Launch**: Deploy to production and ensure smooth launch.
69120

70-
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
121+
## User Scenario
122+
123+
For students, EdTract is a one-stop-shop for learning-related activities in a safe environment. It offers features like scheduling study sessions, real-time chat, extracurricular group joining, and resource sharing, making learning enjoyable and collaborative.
124+
125+
## Installation
126+
127+
To set up the project locally, follow these steps:
128+
129+
1. Clone the repository:
130+
131+
```bash
132+
git clone https://github.com/EdTract/EdTract-ReactJS.git
133+
cd EdTract-ReactJS
134+
```
135+
136+
2. Install dependencies:
137+
138+
```bash
139+
npm install
140+
```
141+
142+
3. Start the development server:
143+
```bash
144+
npm start
145+
```
146+
147+
## Usage
148+
149+
For detailed usage instructions, refer to the respective pages in the `src/pages/home` directory and the `README.md` file in the backend repository.
150+
151+
## Contributing
152+
153+
Contributions are welcome! Feel free to open issues or submit pull requests to help improve EdTract. Ensure you follow the contribution guidelines outlined in the `CONTRIBUTING.md` file.
154+
155+
## License
156+
157+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
158+
159+
---
160+
161+
EdTract aims to transform the educational experience for students in Sri Lanka by providing a safe, collaborative, and engaging platform. Start exploring and contributing to EdTract today!

src/components/Alert.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import { useDispatch, useSelector } from "react-redux";
33
import { remove } from "../features/alerts";
4-
import "../styles/Alert.css"; // Importing custom CSS for additional styling
4+
import "../styles/components/Alert.css"; // Importing custom CSS for additional styling
55

66
const Alert = () => {
77
const flashedMessages = useSelector((state) => state.alerts.values);

src/components/Footer.jsx

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import React from "react";
2+
import { Container, Row, Col } from "react-bootstrap";
3+
import "../styles/components/Footer.css";
4+
import {
5+
FaFacebookF,
6+
FaTwitter,
7+
FaInstagram,
8+
FaLinkedinIn,
9+
} from "react-icons/fa";
10+
11+
export default function Footer() {
12+
return (
13+
<footer className="footer">
14+
<Container>
15+
<Row>
16+
<Col md={4}>
17+
<h5>Company</h5>
18+
<ul className="list-unstyled">
19+
<li>About Us</li>
20+
<li>Careers</li>
21+
<li>Contact Us</li>
22+
</ul>
23+
</Col>
24+
<Col md={4}>
25+
<h5>Quick Links</h5>
26+
<ul className="list-unstyled">
27+
<li>Home</li>
28+
<li>Services</li>
29+
<li>Blog</li>
30+
</ul>
31+
</Col>
32+
<Col md={4}>
33+
<h5>Follow Us</h5>
34+
<div className="social-icons">
35+
<a href="#" className="social-icon">
36+
<FaFacebookF />
37+
</a>
38+
<a href="#" className="social-icon">
39+
<FaTwitter />
40+
</a>
41+
<a href="#" className="social-icon">
42+
<FaInstagram />
43+
</a>
44+
<a href="#" className="social-icon">
45+
<FaLinkedinIn />
46+
</a>
47+
</div>
48+
</Col>
49+
</Row>
50+
<Row>
51+
<Col className="text-center mt-4">
52+
<p>&copy; 2024 Your Company. All rights reserved.</p>
53+
</Col>
54+
</Row>
55+
</Container>
56+
</footer>
57+
);
58+
}

src/components/Forms/ContactForm.jsx

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import React, { useState } from "react";
2+
import "../../styles/components/Forms/ContactForm.css";
3+
const ContactForm = ({ onSubmit }) => {
4+
const [name, setName] = useState("");
5+
const [email, setEmail] = useState("");
6+
const [message, setMessage] = useState("");
7+
8+
const handleSubmit = (e) => {
9+
e.preventDefault();
10+
onSubmit({ name, email, message });
11+
setName("");
12+
setEmail("");
13+
setMessage("");
14+
};
15+
16+
return (
17+
<form className="contact-form" onSubmit={handleSubmit}>
18+
<input
19+
type="text"
20+
placeholder="Your Name"
21+
value={name}
22+
onChange={(e) => setName(e.target.value)}
23+
required
24+
/>
25+
<input
26+
type="email"
27+
placeholder="Your Email"
28+
value={email}
29+
onChange={(e) => setEmail(e.target.value)}
30+
required
31+
/>
32+
<textarea
33+
placeholder="Your Message"
34+
rows="5"
35+
value={message}
36+
onChange={(e) => setMessage(e.target.value)}
37+
required
38+
></textarea>
39+
<button type="submit">Send Message</button>
40+
</form>
41+
);
42+
};
43+
44+
export default ContactForm;

src/components/Forms/LoginForm.jsx

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import React, { useState } from "react";
2+
import { FcGoogle } from "react-icons/fc";
3+
import "../../styles/components/Forms/LoginForm.css";
4+
export default function LoginForm({
5+
handleEmailAndPasswordSubmit,
6+
handleGoogleSubmit,
7+
}) {
8+
const [email, setEmail] = useState("");
9+
const [password, setPassword] = useState("");
10+
return (
11+
<>
12+
<form
13+
className="login-form"
14+
onSubmit={(e) => {
15+
e.preventDefault();
16+
handleEmailAndPasswordSubmit({ email, password });
17+
}}
18+
>
19+
<label htmlFor="email">Email address</label>
20+
<input
21+
type="email"
22+
id="email"
23+
placeholder="Enter email"
24+
value={email}
25+
onChange={(e) => {
26+
setEmail(e.target.value);
27+
}}
28+
/>
29+
30+
<label htmlFor="password">Password</label>
31+
<input
32+
type="password"
33+
id="password"
34+
placeholder="Password"
35+
value={password}
36+
onChange={(e) => {
37+
setPassword(e.target.value);
38+
}}
39+
/>
40+
<button type="submit" className="login-button">
41+
Login
42+
</button>
43+
</form>
44+
<div className="login-or">or</div>
45+
<button
46+
className="google-login-button"
47+
onClick={() => {
48+
handleGoogleSubmit();
49+
}}
50+
>
51+
<FcGoogle size="20px" style={{ marginRight: "10px" }} />
52+
Login with Google
53+
</button>
54+
</>
55+
);
56+
}

0 commit comments

Comments
 (0)