Skip to content

rokesh-venkat/CodeAlpha_Nexora

Repository files navigation

🌌 NEXORA — Global Innovation Social Hub

Tech Stack Monorepo ORM License

Nexora is a modern, high-performance social networking platform built for showcasing and discussing global innovations. From breakthroughs in artificial intelligence and space exploration to green energy advancements, Nexora is where innovators connect, share, and collaborate.

Designed with a sleek, premium dark-mode interface, custom micro-animations, and dynamic visual layouts, Nexora represents the future of professional tech sharing.


✨ Features

  • 🌐 Global Feed: Real-time post updates featuring rich descriptions, hashtags, and media links.
  • 🔥 Trending Innovations: Dynamic feed highlighting the most liked posts.
  • 💬 Community Interactivity: Nested comments, likes, and follows.
  • 👤 Interactive Profiles: Custom bio, display names, profile avatars, following/followers lists, and personal post statistics.
  • 🔍 Advanced Search: Filter and search through topics, innovation tags, and users instantly.
  • 🛡️ Secure Session Auth: Signed cookies with cookie sessions for same-origin authentication.
  • 🌓 Dark Mode: Sleek dark and light styling with custom CSS transitions.

🛠️ Technology Stack

Layer Technologies Used
Frontend React 19, Vite 7, Tailwind CSS 4, shadcn/ui, wouter, TanStack Query
Backend Express 5, Node.js, TypeScript 5.x, Pino Logger
Database PostgreSQL 15, Drizzle ORM, drizzle-zod
API Layer OpenAPI 3.1, Orval Codegen, Zod validation
Monorepo Manager pnpm Workspaces

📂 Project Architecture

nexora/
├── pnpm-workspace.yaml          # Monorepo workspaces definition
├── package.json                  # Root script workflows
├── tsconfig.base.json            # Base TypeScript configuration
│
├── artifacts/
│   ├── api-server/               # Express 5 REST API server
│   │   ├── src/
│   │   │   ├── app.ts            # App middleware setup
│   │   │   ├── index.ts          # Express startup listener
│   │   │   └── routes/           # Users, posts, comments, likes, sessions
│   │   └── .env                  # Server env config
│   │
│   └── pulse/                    # React 19 Frontend Web Client
│       ├── src/
│       │   ├── App.tsx           # Router & auth hooks
│       │   ├── components/       # Custom PostCard, Composer, Layouts
│       │   ├── pages/            # Feed, Trending, Profile, Login
│       │   └── index.css         # Styling system & animations
│       └── .env                  # Web application env config
│
├── lib/
│   ├── db/                       # Shared Database Layer
│   │   ├── src/schema/           # Drizzle table schemas
│   │   └── drizzle.config.ts     # Migration config
│   │
│   ├── api-spec/                 # API contracts (OpenAPI schema)
│   └── api-client-react/         # Auto-generated react query hooks (Orval)
│
└── scripts/                      # DB seeding & developer utility scripts

🚀 Getting Started

Follow these steps to run Nexora locally.

1. Prerequisites

Ensure you have the following installed:

  • Node.js (v22.x or higher)
  • pnpm (npm install -g pnpm)
  • Docker Desktop (for running PostgreSQL easily)
  • Git

2. Clone the Project

git clone https://github.com/rokesh-venkat/CodeAlpha_Nexora.git
cd CodeAlpha_Nexora

3. Install Workspace Dependencies

Installs all dependencies across the monorepo:

pnpm install

4. Setup Environment Variables

Copy the templates to create .env files in each project workspace:

API Server (artifacts/api-server/.env)

DATABASE_URL=postgresql://rokesh369:QGFDSA890HJKL@localhost:5432/nexora_db
SESSION_SECRET=30594d53d90a78ee9afbb53e4ccd078a5260f1e04b83ffbc8b074cb045dcb984
PORT=5000

Frontend (artifacts/pulse/.env)

PORT=5173
BASE_PATH=/
VITE_API_URL=http://localhost:5000

Database (lib/db/.env)

DATABASE_URL=postgresql://rokesh369:QGFDSA890HJKL@localhost:5432/nexora_db

5. Spin Up PostgreSQL

Run PostgreSQL in a Docker container using the credentials in your .env configuration:

docker run -d \
  --name nexora-postgres \
  -e POSTGRES_USER=rokesh369 \
  -e POSTGRES_PASSWORD=QGFDSA890HJKL \
  -e POSTGRES_DB=nexora_db \
  -p 5432:5432 \
  --restart unless-stopped \
  postgres:15

(If the container already exists, just run docker start nexora-postgres)


6. Migrate and Seed the Schema

Push your database schema (users, posts, comments, likes, follows) to the database:

cd lib/db
pnpm run push
cd ../..

7. Run the Application

Start the backend API server and the frontend dev server simultaneously using the root scripts:

Open Terminal 1 (Run API Server):

pnpm --filter @workspace/api-server run dev

(Server listens on http://localhost:5000)

Open Terminal 2 (Run Frontend Client):

pnpm --filter @workspace/pulse run dev

(Web application runs on http://localhost:5173)

Now open your browser and navigate to http://localhost:5173 🎉


📡 API Reference

Method Endpoint Description
GET /api/healthz Health check endpoint
POST /api/users Register a new user
POST /api/session Login and establish session
GET /api/session Get currently logged in user info
DELETE /api/session Sign out
GET /api/posts Fetch all posts (global feed)
POST /api/posts Create a new innovation post
POST /api/posts/:id/like Toggle like status on a post
GET /api/posts/:id/comments Fetch post comment thread
POST /api/posts/:id/comments Write a comment on a post
GET /api/feed/:userId Get personalized feed of followed users
GET /api/users/:id/stats Retrieve user stats (post, following counts)

🤝 Contributing

Contributions are welcome! If you'd like to help improve Nexora:

  1. Fork this Repository.
  2. Create a feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A high-performance, full-stack monorepo platform built with React 19, Express 5, and PostgreSQL for sharing, trending, and discussing global tech innovations

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages