Web application to manage a dynamic digital community. The platform will feature an interactive feed where members and administrators can start and engage in conversations
MIT License
Welcome to the repository for the Community Web Application. This project is a minimal viable product (MVP) designed to create a platform where users can engage in conversations, share ideas, and connect with other members. The application features user authentication, conversation feeds, commenting, notifications, and a member ranking system.
Clone the Repository
git clone https://github.com/yourusername/community-app-mvp.git
cd community-app-mvp
Install Dependencies
# Using npm
npm install
Create a .env
file in the root directory of the project and add the following environment variables:
# .env
DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE_NAME"
JWT_SECRET="your_jwt_secret_key"
PORT=3000
Replace USER
, PASSWORD
, HOST
, PORT
, and DATABASE_NAME
with your PostgreSQL database credentials.
Development Mode
npm run dev
This command starts the server with hot reloading using Nodemon.
Production Mode
npm start
The API follows RESTful principles and is documented using OpenAPI (Swagger).
docs/openapi.yaml
.For detailed information about the API endpoints, request/response formats, and error handling, refer to the API Documentation.
The database schema is designed using PostgreSQL
For an in-depth explanation of the database structure, entities, and relationships, refer to the Database Schema Documentation
community-pro/
├── .husky/
├── docs/
├── public/
├── src/
│ ├── app/
│ │ ├── api/
│ │ ├── fonts/
│ │ ├── globals.css
│ │ ├── layout.tsx
│ │ └── page.tsx
│ ├── components/
│ │ └── ui/
│ ├── application/
│ │ ├── dtos/
│ │ └── use-cases/
│ ├── domain/
│ │ ├── entities/
│ │ └── interfaces/
│ ├── infraestructure/
│ │ ├── database/
│ │ └── mappers/
│ └──lib/
├── .prettierrc
├── tailwind.config.ts
├── postcss.config.mjs
├── components.json
├── docker-compose.yml
├── next-env.d.ts
├── next.config.mjs
├── package.json
├── .eslintrc.json
├── .gitignore
└── tsconfig.json
src/
: Contains the application source code.
/app
: Next App Router logic for pagescomponents/
: Reusable React components.
components/ui
: Shadcn UI Componentsdomain/
: Entities and Interfacesinfraestructure/
: Logic related to database and mappersapplication/
: Use Cases related to business logic and DTOslib/
: Utilspublic/
: Contains static assets.docs/
: Contains documentation files.Independence from Frameworks: Our domain code and business logic do not depend on any external framework.
Testability: By separating responsibilities, we can test each component in isolation.
Independence from the UI: Our business logic can operate without a specific user interface.
Independence from the Database: Our domain is unaware of data persistence details.
Independence from Any External Agency: Our business core does not depend on anything external.
src/domain/entities
):Conversation
, User
, Topic
src/domain/interfaces
):ConversationRepository
src/application/use-cases
):GetConversationsUseCase
src/infrastructure/database
):VercelPostgresConversationRepository
src/infrastructure/mappers
):ConversationMapper
src/application/dtos
):PrismaConversationRepository
) provide the actual implementation of these interfaces.We welcome contributions to improve this project!
Fork the Repository
Click the "Fork" button at the top right of this page to create a copy of this repository under your GitHub account.
Clone Your Fork
git clone https://github.com/yourusername/community-pro.git
cd community-pro
Create a New Branch
git checkout -b feature/your-feature-name
Make Changes
Implement your feature or fix.
Commit Changes
git add .
git commit -m "Add your commit message here"
Push to Your Fork
git push origin feature/your-feature-name
Create a Pull Request
Go to the original repository and click on Pull Requests, then "New Pull Request". Follow the prompts to submit your pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
If you have any questions or suggestions, feel free to open an issue or reach out directly.