Skip to content

Commit ff7f7e3

Browse files
committed
Upload project to GitHub
1 parent 2aa5809 commit ff7f7e3

File tree

23 files changed

+441
-286
lines changed

23 files changed

+441
-286
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# REPLACE THE VALUES BELOW WITH YOUR ACTUAL KEYS IF NOT AUTOMATICALLY SET
2-
2+
MONGO_URI=mongodb+srv://ramvj2005:Vrram46@brocode-rocket.kl8hmlg.mongodb.net/?retryWrites=true&w=majority&appName=brocode-rocket
33
VITE_SUPABASE_URL=https://dummy.supabase.co
44
VITE_SUPABASE_ANON_KEY=dummykey.updateyourkkey.here
55
VITE_OPENAI_API_KEY=your-openai-api-key-here
@@ -8,4 +8,4 @@ VITE_ANTHROPIC_API_KEY=your-anthropic-api-key-here
88
VITE_GOOGLE_ANALYTICS_ID=your-google-analytics-id-here
99
VITE_ADSENSE_ID=your-adsense-id-here
1010
VITE_PERPLEXITY_API_KEY=your-perplexity-api-key-here
11-
VITE_STRIPE_PUBLISHABLE_KEY=your-stripe-publishable-key-here
11+
VITE_STRIPE_PUBLISHABLE_KEY=your-stripe-publishable-key-here

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Ramkumar
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1 @@
1-
# React
2-
3-
A modern React-based project utilizing the latest frontend technologies and tools for building responsive web applications.
4-
5-
## 🚀 Features
6-
7-
- **React 18** - React version with improved rendering and concurrent features
8-
- **Vite** - Lightning-fast build tool and development server
9-
- **Redux Toolkit** - State management with simplified Redux setup
10-
- **TailwindCSS** - Utility-first CSS framework with extensive customization
11-
- **React Router v6** - Declarative routing for React applications
12-
- **Data Visualization** - Integrated D3.js and Recharts for powerful data visualization
13-
- **Form Management** - React Hook Form for efficient form handling
14-
- **Animation** - Framer Motion for smooth UI animations
15-
- **Testing** - Jest and React Testing Library setup
16-
17-
## 📋 Prerequisites
18-
19-
- Node.js (v14.x or higher)
20-
- npm or yarn
21-
22-
## 🛠️ Installation
23-
24-
1. Install dependencies:
25-
```bash
26-
npm install
27-
# or
28-
yarn install
29-
```
30-
31-
2. Start the development server:
32-
```bash
33-
npm start
34-
# or
35-
yarn start
36-
```
37-
38-
## 📁 Project Structure
39-
40-
```
41-
react_app/
42-
├── public/ # Static assets
43-
├── src/
44-
│ ├── components/ # Reusable UI components
45-
│ ├── pages/ # Page components
46-
│ ├── styles/ # Global styles and Tailwind configuration
47-
│ ├── App.jsx # Main application component
48-
│ ├── Routes.jsx # Application routes
49-
│ └── index.jsx # Application entry point
50-
├── .env # Environment variables
51-
├── index.html # HTML template
52-
├── package.json # Project dependencies and scripts
53-
├── tailwind.config.js # Tailwind CSS configuration
54-
└── vite.config.js # Vite configuration
55-
```
56-
57-
## 🧩 Adding Routes
58-
59-
To add new routes to the application, update the `Routes.jsx` file:
60-
61-
```jsx
62-
import { useRoutes } from "react-router-dom";
63-
import HomePage from "pages/HomePage";
64-
import AboutPage from "pages/AboutPage";
65-
66-
const ProjectRoutes = () => {
67-
let element = useRoutes([
68-
{ path: "/", element: <HomePage /> },
69-
{ path: "/about", element: <AboutPage /> },
70-
// Add more routes as needed
71-
]);
72-
73-
return element;
74-
};
75-
```
76-
77-
## 🎨 Styling
78-
79-
This project uses Tailwind CSS for styling. The configuration includes:
80-
81-
- Forms plugin for form styling
82-
- Typography plugin for text styling
83-
- Aspect ratio plugin for responsive elements
84-
- Container queries for component-specific responsive design
85-
- Fluid typography for responsive text
86-
- Animation utilities
87-
88-
## 📱 Responsive Design
89-
90-
The app is built with responsive design using Tailwind CSS breakpoints.
91-
92-
93-
## 📦 Deployment
94-
95-
Build the application for production:
96-
97-
```bash
98-
npm run build
99-
```
100-
101-
## 🙏 Acknowledgments
102-
103-
- Built with [Rocket.new](https://rocket.new)
104-
- Powered by React and Vite
105-
- Styled with Tailwind CSS
106-
107-
Built with ❤️ on Rocket.new
1+
# Brocode-meetup

backend/app.js

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
const path = require('path');
2+
require('dotenv').config({ path: path.resolve(__dirname, '.env') });
3+
const mongoose = require('mongoose');
4+
const cors = require('cors');
5+
var express = require('express');
6+
var pathLib = require('path');
7+
var cookieParser = require('cookie-parser');
8+
var logger = require('morgan');
9+
10+
const mongoURI = process.env.MONGO_URI;
11+
console.log('🔍 MONGO_URI:', mongoURI);
12+
13+
mongoose.connect(mongoURI, {
14+
useNewUrlParser: true,
15+
useUnifiedTopology: true,
16+
})
17+
.then(() => console.log('✅ MongoDB connected'))
18+
.catch((err) => console.error('❌ MongoDB connection error:', err.message));
19+
20+
var indexRouter = require('./routes/index');
21+
var usersRouter = require('./routes/users');
22+
const eventsRouter = require('./routes/events');
23+
24+
var app = express();
25+
app.use(cors({
26+
origin: '*',
27+
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
28+
allowedHeaders: ['Content-Type', 'Authorization'],
29+
credentials: true
30+
}));
31+
32+
app.use(logger('dev'));
33+
app.use(express.json());
34+
app.use(express.urlencoded({ extended: false }));
35+
app.use(cookieParser());
36+
app.use(express.static(pathLib.join(__dirname, 'public')));
37+
38+
app.use('/', indexRouter);
39+
app.use('/users', usersRouter);
40+
app.use('/events', eventsRouter);
41+
42+
// Health check route
43+
app.get('/test', (req, res) => {
44+
res.send('Backend is working!');
45+
});
46+
47+
module.exports = app;

backend/bin/www

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#!/usr/bin/env node
2+
3+
/**
4+
* Module dependencies.
5+
*/
6+
7+
var app = require('../app');
8+
var debug = require('debug')('backend:server');
9+
var http = require('http');
10+
11+
/**
12+
* Get port from environment and store in Express.
13+
*/
14+
15+
var port = normalizePort(process.env.PORT || '3000');
16+
app.set('port', port);
17+
18+
/**
19+
* Create HTTP server.
20+
*/
21+
22+
var server = http.createServer(app);
23+
24+
/**
25+
* Listen on provided port, on all network interfaces.
26+
*/
27+
28+
server.listen(port);
29+
server.on('error', onError);
30+
server.on('listening', onListening);
31+
32+
/**
33+
* Normalize a port into a number, string, or false.
34+
*/
35+
36+
function normalizePort(val) {
37+
var port = parseInt(val, 10);
38+
39+
if (isNaN(port)) {
40+
// named pipe
41+
return val;
42+
}
43+
44+
if (port >= 0) {
45+
// port number
46+
return port;
47+
}
48+
49+
return false;
50+
}
51+
52+
/**
53+
* Event listener for HTTP server "error" event.
54+
*/
55+
56+
function onError(error) {
57+
if (error.syscall !== 'listen') {
58+
throw error;
59+
}
60+
61+
var bind = typeof port === 'string'
62+
? 'Pipe ' + port
63+
: 'Port ' + port;
64+
65+
// handle specific listen errors with friendly messages
66+
switch (error.code) {
67+
case 'EACCES':
68+
console.error(bind + ' requires elevated privileges');
69+
process.exit(1);
70+
break;
71+
case 'EADDRINUSE':
72+
console.error(bind + ' is already in use');
73+
process.exit(1);
74+
break;
75+
default:
76+
throw error;
77+
}
78+
}
79+
80+
/**
81+
* Event listener for HTTP server "listening" event.
82+
*/
83+
84+
function onListening() {
85+
var addr = server.address();
86+
var bind = typeof addr === 'string'
87+
? 'pipe ' + addr
88+
: 'port ' + addr.port;
89+
debug('Listening on ' + bind);
90+
}

backend/models/Event.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const mongoose = require('mongoose');
2+
3+
const eventSchema = new mongoose.Schema({
4+
title: { type: String, required: true },
5+
description: { type: String },
6+
date: { type: Date, required: true },
7+
location: { type: String },
8+
createdBy: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true },
9+
createdAt: { type: Date, default: Date.now },
10+
updatedAt: { type: Date, default: Date.now }
11+
});
12+
13+
eventSchema.pre('save', function(next) {
14+
this.updatedAt = Date.now();
15+
next();
16+
});
17+
18+
module.exports = mongoose.model('Event', eventSchema);

backend/models/User.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const mongoose = require('mongoose');
2+
3+
const userSchema = new mongoose.Schema({
4+
userId: {
5+
type: String,
6+
required: true,
7+
unique: true,
8+
index: true, // for search
9+
match: /^@[a-zA-Z0-9_]{3,}$/ // e.g., @username
10+
},
11+
email: {
12+
type: String,
13+
required: true,
14+
unique: true
15+
},
16+
password: {
17+
type: String,
18+
required: true
19+
},
20+
createdAt: {
21+
type: Date,
22+
default: Date.now
23+
}
24+
});
25+
26+
module.exports = mongoose.model('User', userSchema);

backend/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "backend",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"start": "node ./bin/www"
7+
},
8+
"dependencies": {
9+
"cookie-parser": "~1.4.4",
10+
"debug": "~2.6.9",
11+
"express": "~4.16.1",
12+
"mongoose": "^8.16.2",
13+
"morgan": "~1.9.1",
14+
"nodemailer": "^7.0.5",
15+
"socket.io": "^4.8.1"
16+
}
17+
}

backend/public/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<html>
2+
3+
<head>
4+
<title>Express</title>
5+
<link rel="stylesheet" href="/stylesheets/style.css">
6+
</head>
7+
8+
<body>
9+
<h1>Express</h1>
10+
<p>Welcome to Express</p>
11+
</body>
12+
13+
</html>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
body {
2+
padding: 50px;
3+
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
4+
}
5+
6+
a {
7+
color: #00B7FF;
8+
}

0 commit comments

Comments
 (0)