DevMeet is a platform where developers can share knowledge through articles, discussions, and comments. It’s a community-driven platform aimed at fostering collaboration and learning.
Follow these steps to clone and run the project locally:
Make sure you have the following installed:
-
Clone the repository to your local machine:
git clone https://github.com/Sushanto171/devmeet.git
-
Navigate into the project directory:
cd devmeet -
Install the required dependencies:
npm install
-
Create a
.envfile in the root directory and add your environment variables (e.g., for MongoDB, NextAuth credentials):NEXTAUTH_URL=http://localhost:3000 MONGO_URI=your_mongo_db_connection_string GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret
-
Run the development server:
npm run dev
-
Open your browser and visit
http://localhost:3000to see the app in action!
npm run dev— Starts the development server athttp://localhost:3000npm run build— Builds the app for productionnpm run start— Starts the app in production mode
Here’s a simple folder structure for a Next.js project:
devmeet/
├── public/ # Static assets (images, favicon, etc.)
│ └── favicon.ico
├── src/ # Source code
│ ├── app/ # Main app directory (App Router)
│ │ ├── layout.js # Main layout for the app
│ │ ├── page.js # Homepage
│ │ ├── posts/ # Post-related pages
│ │ │ ├── page.js # List of posts
│ │ │ └── [slug].js # Individual post page
│ │ └── profile/ # User profile pages
│ │ └── page.js # User profile page
│ ├── components/ # Reusable components
│ │ ├── Header.js # Header component
│ │ ├── PostCard.js # Post card component
│ │ └── Comment.js # Comment component
│ ├── styles/ # Global styles (CSS or SCSS)
│ │ └── globals.css # Global styles
├── .env # Environment variables
├── .gitignore # Git ignore file
├── package.json # Project dependencies and scripts
├── next.config.js # Next.js configuration
└── README.md # Project documentation
public/: For static assets like images, fonts, and the favicon.src/: Contains the main application code:app/: Contains layout and page components. This includes routes for the homepage, posts, and user profiles.components/: Reusable UI components like header, post cards, and comment sections.styles/: Global styles for the app.
package.json: For managing project dependencies and scripts.next.config.js: Next.js configuration file..env: For storing environment variables.
This simple structure is great for small to medium-sized projects and can be easily extended as the app grows.
If you'd like to contribute to the project, follow these steps:
-
Clone the repository to your local machine.
-
Fetch the latest changes from the
mainrepository:git fetch origin git checkout main git merge origin/main
-
Create a new development branch based on
main:git checkout -b dev-yourname
Replace
yournamewith your GitHub username or feature name. -
Make the necessary changes in your branch.
-
Commit your changes:
git add . git commit -m "[ADDED]/[UPDATED] feature/bugfix: description"
-
Push your changes to your development branch:
git push origin dev-yourname
-
Do not push directly to the
mainbranch. Instead, create a Pull Request (PR) from your development branch to thedevelopmentbranch (or a feature branch designated by the owner). Please provide a clear description of the changes you made in your PR. -
The project owner will review your PR and, if everything looks good, will merge it into the
mainbranch.
This project is licensed under the MIT License - see the LICENSE file for details.