This project is a simple text-based web application similar to Twitter. It allows users to post updates, search for content, chat in real-time, and view user profiles.
- Home Feed (
/home): Displays posts from all users. - Search (
/search): Allows users to search for content. - Messages (
/messages): Real-time chat functionality. - Compose: Button to create new posts.
- User Profile (
/:username): Displays profile information and posts of a specific user.
-
Frontend:
- HTML
- CSS
- JavaScript
-
Backend:
- Node.js
- Express
- EJS (Embedded JavaScript templates)
-
Database:
- MongoDB
- Mongoose
-
Authentication:
- Passport-local
-
Real-time Communication:
- WebSocket
- models: Contains Mongoose models.
- controllers: Contains logic for handling requests.
- views: Contains EJS templates for rendering the UI.
- routers: Contains route definitions.
- utils: Contains utility functions.
-
Clone the repository:
git clone https://github.com/ausane/terra.git
-
Navigate to the project directory:
cd terra -
Install dependencies:
npm install
-
Set up environment variables in a
.envfile:PORT=8080 COOKIE_CODE=your_cookie_code MONGODB_ATLAS_URL=your_mongodb_uri SESSION_SECRET=your_session_secret
-
Start the application:
node app.js
- Navigate to
http://localhost:8080/hometo view the home feed. - Use the search functionality at
http://localhost:8080/search. - Chat with other users in real-time at
http://localhost:8080/messages. - Create a new post using the compose button.
- View user profiles at
http://localhost:8080/:username.
Feel free to submit issues or pull requests. Contributions are welcome!