Skip to content

Commit db773a5

Browse files
committed
prepare for deployment
1 parent db4b53b commit db773a5

File tree

20 files changed

+727
-602
lines changed

20 files changed

+727
-602
lines changed

README.md

Lines changed: 115 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,121 @@
1-
# Dev Overflow
1+
# DevOverflow
2+
3+
![](/assets/home-page.png)
24

35
A community-driven plateform for asking and answering programming questions. Get help, share knowledge, and collaborate with developers from around the world. Explore topics in web development, mobile app development, algorithms, data structures, and more.
46

5-
## Features
7+
## Technologies Used
8+
9+
<details>
10+
<summary>DevOverflow is built using the following technologies:</summary>
11+
12+
- **TypeScript**: TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
13+
- **Next.js**: Next.js is a React framework for building server-side rendered and statically generated web applications.
14+
- **Tailwind CSS**: Tailwind CSS is a utility-first CSS framework for rapidly building custom user interfaces.
15+
- **Clerk**: Clerk is a developer-first authentication API that handles all the logic for user sign up, sign in, and more.
16+
- **Shadcn-UI**: Shadcn UI is a React UI library that helps developers rapidly build modern web applications.
17+
- **TinyMCE**: TinyMCE is the world's most popular JavaScript library for rich text editing.
18+
- **MongoDB**: MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era.
19+
- **Mongoose**: Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.
20+
- **Prism.js**: Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind.
21+
- **Query String**: Parse and stringify URL query strings.
22+
- **Svix**: Svix is a webhook proxy that allows you to receive webhooks locally.
23+
- **Zod**: Zod is a TypeScript-first schema declaration and validation library.
24+
- **Vercel**: Vercel is a cloud platform for frontend developers, providing the frameworks, workflows, and infrastructure to build a faster, more personalized Web.
25+
26+
</details>
27+
28+
## Getting Started
29+
30+
Follow these steps to set up the project locally on your machine:
31+
32+
### Prerequisites
33+
34+
Make sure you have the following software installed on your system:
35+
36+
- [Node.js](https://nodejs.org/)
37+
- [NPM](https://docs.npmjs.com/getting-started)
38+
- [Git](https://git-scm.com/downloads)
39+
40+
### Installation
41+
42+
1. Clone the repository to your local machine:
43+
44+
```bash
45+
git clone https://github.com/sothulthorn/nextjs-dev-overflow
46+
```
47+
48+
2. Create a `.env` file:
49+
50+
```bash
51+
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=YOUR_NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
52+
CLERK_SECRET_KEY=YOUR_CLERK_SECRET_KEY
53+
54+
NEXT_PUBLIC_CLERK_SIGN_IN_URL=YOUR_NEXT_PUBLIC_CLERK_SIGN_IN_URL
55+
NEXT_PUBLIC_CLERK_SIGN_UP_URL=YOUR_NEXT_PUBLIC_CLERK_SIGN_UP_URL
56+
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=YOUR_NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL
57+
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=YOUR_NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL
58+
59+
NEXT_CLERK_WEBHOOK_SECRET=YOUR_NEXT_CLERK_WEBHOOK_SECRET
60+
61+
NEXT_PUBLIC_TINY_EDITOR_API_KEY=YOUR_NEXT_PUBLIC_TINY_EDITOR_API_KEY
62+
63+
MONGODB_URL=YOUR_MONGODB_URL
64+
65+
NEXT_PUBLIC_SERVER_URL=YOUR_NEXT_PUBLIC_SERVER_URL
66+
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
67+
```
68+
69+
4. Install dependencies:
70+
71+
```bash
72+
npm install
73+
```
74+
75+
5. Start the development server:
76+
77+
```bash
78+
npm run dev
79+
```
80+
81+
### Usage
82+
83+
Visit `http://localhost:3000/` in your browser to access the full application.
84+
85+
## Project Preview
86+
87+
### Home
88+
89+
![](/assets/home-page.png)
90+
91+
### Signup
92+
93+
![](/assets/signup.png)
94+
95+
### Signin
96+
97+
![](/assets/signin.png)
98+
99+
### Community
100+
101+
![](/assets/community.png)
102+
103+
### Collections
104+
105+
![](/assets/collections.png)
106+
107+
### Profile
108+
109+
![](/assets/profile.png)
110+
111+
### Edit Profile
112+
113+
![](/assets/edit-profile.png)
114+
115+
### Ask a Question
6116

7-
- User Authentication - Sign In / Sign Up
8-
- Dark and Light Mode
9-
- Post the Questions to the community
10-
- Provide the Answer for the asked questions
117+
![](/assets/ask-question.png)
11118

12-
## Tech Stack
119+
### Question and Answer
13120

14-
- Next JS 13
15-
- Typescript
16-
- Mongodb / Mongoose - Database
17-
- Clerk - User Authentication
18-
- Vercel - Deploy Application
121+
![](/assets/question-answer.png)

app/(root)/question/[id]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Image from 'next/image';
1212
import Link from 'next/link';
1313
import React from 'react';
1414

15-
const Page = async ({ params, searchParams }) => {
15+
const Page = async ({ params, searchParams }: any) => {
1616
const result = await getQuestionById({ questionId: params.id });
1717
const { userId: clerkId } = auth();
1818

app/(root)/tags/[id]/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import QuestionCard from '@/components/cards/QuestionCard';
22
import NoResult from '@/components/shared/NoResult';
33
import Pagination from '@/components/shared/Pagination';
44
import LocalSearchbar from '@/components/shared/search/LocalSearchbar';
5-
import { IQuestion } from '@/database/question.model';
65
import { getQuestionsByTagId } from '@/lib/actions/tag.action';
76
import { URLProps } from '@/types';
87
import React from 'react';
@@ -30,7 +29,7 @@ const Page = async ({ params, searchParams }: URLProps) => {
3029

3130
<div className="mt-10 flex w-full flex-col gap-6">
3231
{result.questions.length > 0 ? (
33-
result.questions.map((question: IQuestion) => (
32+
result.questions.map((question: any) => (
3433
<QuestionCard
3534
key={question._id}
3635
_id={question._id}

assets/ask-question.png

359 KB
Loading

assets/collections.png

394 KB
Loading

assets/community.png

361 KB
Loading

assets/edit-profile.png

305 KB
Loading

assets/home-page.png

430 KB
Loading

assets/profile.png

491 KB
Loading

assets/question-answer.png

394 KB
Loading

0 commit comments

Comments
 (0)