Skip to content

Dev-Matheus-Felipe/CodeNest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

77 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’ป Code Nest

Code Nest is a web application inspired by Stack Overflow, built to allow developers to ask questions, share knowledge, and interact with the community in a clean and intuitive way.

The project was developed using Next.js, featuring OAuth2 authentication, database integration with Prisma, and a modern UI with light and dark themes.


๐Ÿš€ Main Features

  • ๐Ÿ“„ View posts made by the community
  • ๐Ÿท๏ธ Browse posts by tags specifications
  • ๐Ÿ‘ฅ Community page with registered users
  • โญ Save posts to personal collections
  • ๐Ÿ‘ค User profile with edit options
  • โ“ Ask and answer questions
  • โœ๏ธ Edit as well as Like questions and answers
  • ๐ŸŒ— Switch between Light Mode and Dark Mode

๐Ÿ“‘ Pages

  • Home โ€“ General feed of questions
  • Community โ€“ Platform users
  • Collections โ€“ Saved posts
  • Profile โ€“ User profile and edit page
  • Tags โ€“ Questions organized by tags
  • Ask a Question โ€“ Create new questions

๐Ÿ” Authentication

Authentication is handled via OAuth2, using:

  • GitHub
  • Google
  • Discord

The system is implemented with NextAuth (Auth.js) and integrated with the database using the Prisma Adapter.


๐ŸŽฅ Video Demo

โš ๏ธ Coming soon

A demo video will be added showing:

  • Application navigation
  • Asking and answering questions
  • Editing posts and answers
  • Like system
  • Light and dark themes
  • OAuth authentication flow

๐Ÿ› ๏ธ Tech Stack

Frontend

  • Next.js
  • React
  • TypeScript
  • Tailwind CSS
  • next-themes
  • lucide-react

Authentication

  • NextAuth (Auth.js)
  • OAuth2 (GitHub, Google, Discord)

Backend / Database

  • Prisma
  • Prisma Client
  • MongoDB

UX / UI

  • Sonner (toasts & notifications)
  • @uiw/react-textarea-code-editor

โš™๏ธ Getting Started

Follow the steps below to run the project locally.

Clone the repository:

git clone https://github.com/Dev-Matheus-Felipe/CodeNest.git

Navigate to the project directory:

cd CodeNest

Install the dependencies:

npm install

Create a .env file in the root of the project and configure the following variables:

DATABASE_URL="your mongodb database url"
NODE_ENV="development"

AUTH_GITHUB_ID=your_github_client_id
AUTH_GITHUB_SECRET=your_github_client_secret

AUTH_GOOGLE_ID=your_google_client_id
AUTH_GOOGLE_SECRET=your_google_client_secret

AUTH_DISCORD_CLIENT_ID=your_discord_client_id
AUTH_DISCORD_CLIENT_SECRET=your_discord_client_secret

NEXTAUTH_URL=http://localhost:3000
AUTH_TRUST_HOST=true

Generate Prisma Client and Next Auth Secret:

npx auth secret

npx prisma generate

Run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open your browser and access:

http://localhost:3000

Feel free to contribute or open issues if you find any bugs or have suggestions.

Open http://localhost:3000 with your browser to see the result.


๐Ÿ“š Additional Setup Help

If you have any questions about how to configure the MongoDB database or how to obtain OAuth Client IDs and Secrets, please refer to the official documentation links below:

๐Ÿ™ GitHub OAuth

https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app

๐Ÿ”Ž Google OAuth

https://developers.google.com/identity/protocols/oauth2

๐ŸŽฎ Discord OAuth

https://discord.com/developers/docs/topics/oauth2

๐Ÿ—„ MongoDB (Atlas)

https://www.mongodb.com/docs/atlas/getting-started/

https://www.prisma.io/docs/orm/overview/databases/mongodb

๐Ÿ’ก Note

Make sure your OAuth callback URLs match your environment (local or production), and never commit your .env file to the repository.

About

๐Ÿ’ป A web application inspired by Stack Overflow, built to allow developers to ask questions, share knowledge, and interact with the community in a clean and intuitive way.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors