Skip to content

Commit 0547fd6

Browse files
Added markdown files
1 parent ab9b5dc commit 0547fd6

File tree

2 files changed

+262
-16
lines changed

2 files changed

+262
-16
lines changed

CONTRIBUTING.md

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# Contributing to Swoopin
2+
3+
Thank you for your interest in contributing to Swoopin! This document provides guidelines and instructions for contributing to the project.
4+
5+
## Table of Contents
6+
7+
- [Project Structure](#project-structure)
8+
- [Development Workflow](#development-workflow)
9+
- [Adding New Features](#adding-new-features)
10+
- [Code Style Guidelines](#code-style-guidelines)
11+
- [Testing](#testing)
12+
- [Pull Request Process](#pull-request-process)
13+
14+
## Project Structure
15+
16+
Swoopin follows a modular architecture with clear separation of concerns:
17+
18+
```
19+
src/
20+
├── actions/ # Server actions for data mutations
21+
├── app/ # Next.js app router pages and API routes
22+
├── components/ # Reusable UI components
23+
├── constants/ # Global constants and configurations
24+
├── hooks/ # Custom React hooks
25+
├── icons/ # SVG icons as React components
26+
├── lib/ # Utility functions and service integrations
27+
├── providers/ # Context providers (Redux, Theme, etc.)
28+
├── redux/ # Redux store and slices
29+
└── types/ # TypeScript type definitions
30+
```
31+
32+
### Key Directories Explained
33+
34+
- **actions/**: Contains server-side actions for data mutations, organized by feature (analytics, automations, integrations, etc.)
35+
- **app/**: Next.js 14 app router pages and API routes
36+
- `(auth)/`: Authentication-related pages
37+
- `(landingpage)/`: Public landing pages
38+
- `(protected)/`: Authenticated user pages
39+
- `api/`: API routes for external integrations
40+
- **components/**:
41+
- `global/`: Shared components used across multiple pages
42+
- `ui/`: Basic UI components (buttons, inputs, etc.)
43+
44+
## Development Workflow
45+
46+
1. **Fork and Clone**
47+
```bash
48+
git clone https://github.com/your-username/swoopin.git
49+
cd swoopin
50+
```
51+
52+
2. **Install Dependencies**
53+
```bash
54+
npm install
55+
```
56+
57+
3. **Set Up Environment**
58+
- Copy `.env.example` to `.env`
59+
- Add required environment variables:
60+
```env
61+
NEXT_PUBLIC_HOST_URL=your_host_url
62+
STRIPE_SUBSCRIPTION_PRICE_ID=your_stripe_price_id
63+
# Add other required variables
64+
```
65+
66+
4. **Start Development Server**
67+
```bash
68+
npm run dev
69+
```
70+
71+
## Adding New Features
72+
73+
1. **Create a New Branch**
74+
```bash
75+
git checkout -b feature/your-feature-name
76+
```
77+
78+
2. **Feature Implementation Guidelines**
79+
- Place new components in appropriate directories:
80+
- Global components in `src/components/global`
81+
- Page-specific components in their respective page directories
82+
- Add new API routes in `src/app/api`
83+
- Include server actions in `src/actions`
84+
- Update types in `src/types`
85+
86+
3. **State Management**
87+
- Use Redux for global state management
88+
- Create new slices in `src/redux/slices`
89+
- Use React Query for server state management
90+
91+
4. **Database Changes**
92+
- Update Prisma schema in `prisma/schema.prisma`
93+
- Generate migrations:
94+
```bash
95+
npx prisma migrate dev --name your_migration_name
96+
```
97+
98+
## Code Style Guidelines
99+
100+
1. **TypeScript**
101+
- Use TypeScript for all new code
102+
- Define interfaces and types in `src/types`
103+
- Avoid using `any` type
104+
105+
2. **Component Structure**
106+
```typescript
107+
import { FC } from 'react';
108+
109+
interface ComponentProps {
110+
// Define props
111+
}
112+
113+
export const Component: FC<ComponentProps> = ({ props }) => {
114+
return (
115+
// JSX
116+
);
117+
};
118+
```
119+
120+
3. **Naming Conventions**
121+
- Components: PascalCase
122+
- Files: kebab-case
123+
- Functions: camelCase
124+
- Constants: UPPER_SNAKE_CASE
125+
126+
4. **CSS/Styling**
127+
- Use Tailwind CSS classes
128+
- Follow mobile-first approach
129+
- Use CSS modules for custom styles
130+
131+
## Testing
132+
133+
1. **Unit Tests**
134+
- Write tests for utility functions
135+
- Test React components using React Testing Library
136+
- Place tests next to the implementation files
137+
138+
2. **Integration Tests**
139+
- Test API routes
140+
- Test database interactions
141+
- Verify feature workflows
142+
143+
## Pull Request Process
144+
145+
1. **Before Submitting**
146+
- Ensure all tests pass
147+
- Update documentation if needed
148+
- Follow code style guidelines
149+
- Add comments for complex logic
150+
151+
2. **PR Description**
152+
- Clearly describe the changes
153+
- Reference related issues
154+
- Include screenshots for UI changes
155+
- List any breaking changes
156+
157+
3. **Review Process**
158+
- Address reviewer comments
159+
- Keep PR scope focused
160+
- Maintain clear communication
161+
162+
4. **After Merge**
163+
- Delete your feature branch
164+
- Update your local main branch
165+
166+
## Questions and Support
167+
168+
If you have questions or need help:
169+
- Open an issue for bugs
170+
- Use discussions for questions
171+
- Join our community channels
172+
173+
Thank you for contributing to Swoopin! Together, we're building a powerful social media management platform.

README.md

Lines changed: 89 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,109 @@
1-
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
1+
# Swoopin
2+
3+
A modern Next.js application for social media management and automation.
4+
5+
## Overview
6+
7+
Swoopin is a powerful platform built with Next.js that helps users manage their social media presence, automate interactions, and analyze performance. The application integrates with various social media platforms and provides a comprehensive dashboard for managing digital presence.
8+
9+
## Features
10+
11+
- 🔐 Secure authentication with Clerk
12+
- 💳 Stripe integration for subscription management
13+
- 🤖 AI-powered automation capabilities
14+
- 📊 Analytics dashboard
15+
- 🔄 Social media platform integrations
16+
- 📱 Responsive design with modern UI
17+
- 🎨 Tailwind CSS styling
18+
19+
## Tech Stack
20+
21+
- **Framework:** Next.js 14
22+
- **Authentication:** Clerk
23+
- **Database:** Prisma
24+
- **Styling:** Tailwind CSS
25+
- **Payment Processing:** Stripe
26+
- **State Management:** Redux
27+
- **API Integration:** React Query
228

329
## Getting Started
430

5-
First, run the development server:
31+
### Prerequisites
32+
33+
- Node.js 18+
34+
- npm or yarn package manager
35+
36+
### Installation
37+
38+
1. Clone the repository:
39+
```bash
40+
git clone https://github.com/yourusername/swoopin.git
41+
cd swoopin
42+
```
43+
44+
2. Install dependencies:
45+
```bash
46+
npm install
47+
# or
48+
yarn install
49+
```
650

51+
3. Set up environment variables:
52+
Create a `.env` file in the root directory and add the following variables:
53+
```env
54+
NEXT_PUBLIC_HOST_URL=your_host_url
55+
STRIPE_SUBSCRIPTION_PRICE_ID=your_stripe_price_id
56+
# Add other required environment variables
57+
```
58+
59+
4. Run the development server:
760
```bash
861
npm run dev
962
# or
1063
yarn dev
11-
# or
12-
pnpm dev
13-
# or
14-
bun dev
1564
```
1665

1766
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
1867

19-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
68+
## Project Structure
69+
70+
```
71+
src/
72+
├── actions/ # Server actions
73+
├── app/ # App router pages
74+
├── components/ # Reusable components
75+
├── constants/ # Constants and configurations
76+
├── hooks/ # Custom React hooks
77+
├── icons/ # SVG icons
78+
├── lib/ # Utility functions
79+
├── providers/ # Context providers
80+
├── redux/ # Redux store and slices
81+
└── types/ # TypeScript types
82+
```
83+
84+
## API Documentation
85+
86+
The application uses Next.js API routes located in `src/app/api/`. Key endpoints include:
87+
88+
- `/api/payment` - Handles Stripe payment sessions
89+
- `/api/webhook` - Processes webhooks from integrated services
2090

21-
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
91+
## Contributing
2292

23-
## Learn More
93+
Contributions are welcome! Please follow these steps:
2494

25-
To learn more about Next.js, take a look at the following resources:
95+
1. Fork the repository
96+
2. Create a new branch: `git checkout -b feature/your-feature`
97+
3. Make your changes and commit them: `git commit -m 'Add some feature'`
98+
4. Push to the branch: `git push origin feature/your-feature`
99+
5. Submit a pull request
26100

27-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
101+
## License
29102

30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
103+
Copyright (c) 2024 Swoopin. All Rights Reserved.
31104

32-
## Deploy on Vercel
105+
This software and associated documentation files (the "Software") are proprietary and confidential. The Software is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties.
33106

34-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
107+
No part of this Software may be reproduced, modified, displayed, stored in a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording or otherwise), without the prior written permission of Swoopin.
35108

36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
109+
Unauthorized copying, modification, distribution, public display, or use of this Software for any purpose is strictly prohibited and may result in severe civil and criminal penalties.

0 commit comments

Comments
 (0)