Update Info

This commit is contained in:
ADAMJR 2021-08-03 17:06:01 +01:00
parent 1cd3e4d71c
commit 99e11ab77f
6 changed files with 112 additions and 51 deletions

View File

@ -1,52 +1,29 @@
> Welcome to the main README.
# DClone Essential - Discord clone with the essential features.
**This repo consists of 3 projects.**
> Built with React TS, Redux, and Node.js.
## Branches
<a href="https://ibb.co/tqdybrW"><img src="https://i.ibb.co/T4CzH3F/image.png" alt="image" border="0"></a>
- `ap` - Alpha prototype
- `bp` - Beta prototype
- `p` - Final prototype
- `v1` - Version number
## Features
### DClone Essential
- **Server Channels**
- Create channels
- Delete channels
- **Message Management**
- Server owners can delete any message
- Message author can delete and edit their own messages
- **Member Management**
- Kick members as the server owner
- Easily leave the server by right clicking the server
- Join servers with an invite code
- **Server Management**
- Create servers as you would in Discord
- Edit server name, and icon URL in the server settings
- Delete your server in the server settings
- **User Management**
- Manage your account by clicking the settings icon
- Change your username, and avatar
- Delete your user and prevent it from being used to login
- **and more** (of course)
> v1 - v6
- The core features of Discord.
### DClone Full
> v6 - v12
- In development.
---
## API
- The backend of the website.
- Includes the WebSocket and REST API.
## Types
- Ambient types for both project intellisense.
## Website
- The UI.
- Cool but useless without the API running in the background.
---
# Setup
`api/.env`
```
API_PORT=3000
API_PREFIX="/api/v1"
JWT_SECRET_KEY="something secret"
MONGO_URI="mongodb://localhost/dclone-essential"
WEBSITE_PORT=4200
```
> This is only the essential version and just works. The full version is planned to be much more exciting...

52
_README.md Normal file
View File

@ -0,0 +1,52 @@
> Welcome to the main README.
**This repo consists of 3 projects.**
## Branches
- `ap` - Alpha prototype
- `bp` - Beta prototype
- `p` - Final prototype
- `v1` - Version number
### DClone Essential
> v1 - v6
- The core features of Discord.
### DClone Full
> v6 - v12
- In development.
---
## API
- The backend of the website.
- Includes the WebSocket and REST API.
## Types
- Ambient types for both project intellisense.
## Website
- The UI.
- Cool but useless without the API running in the background.
---
# Setup
`api/.env`
```
API_PORT=3000
API_PREFIX="/api/v1"
JWT_SECRET_KEY="something secret"
MONGO_URI="mongodb://localhost/dclone-essential"
WEBSITE_PORT=4200
```

View File

@ -23,6 +23,7 @@
"axios": "^0.21.1",
"babel-plugin-react-scoped-css": "^1.1.1",
"craco-plugin-scoped-css": "^1.1.1",
"dotenv-cli": "^4.0.0",
"javascript-time-ago": "^2.3.8",
"moment": "^2.29.1",
"rc-tooltip": "^5.1.1",
@ -7784,6 +7785,20 @@
"node": ">=8"
}
},
"node_modules/dotenv-cli": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/dotenv-cli/-/dotenv-cli-4.0.0.tgz",
"integrity": "sha512-ByKEec+ashePEXthZaA1fif9XDtcaRnkN7eGdBDx3HHRjwZ/rA1go83Cbs4yRrx3JshsCf96FjAyIA2M672+CQ==",
"dependencies": {
"cross-spawn": "^7.0.1",
"dotenv": "^8.1.0",
"dotenv-expand": "^5.1.0",
"minimist": "^1.1.3"
},
"bin": {
"dotenv": "cli.js"
}
},
"node_modules/dotenv-expand": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz",
@ -31377,6 +31392,17 @@
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
},
"dotenv-cli": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/dotenv-cli/-/dotenv-cli-4.0.0.tgz",
"integrity": "sha512-ByKEec+ashePEXthZaA1fif9XDtcaRnkN7eGdBDx3HHRjwZ/rA1go83Cbs4yRrx3JshsCf96FjAyIA2M672+CQ==",
"requires": {
"cross-spawn": "^7.0.1",
"dotenv": "^8.1.0",
"dotenv-expand": "^5.1.0",
"minimist": "^1.1.3"
}
},
"dotenv-expand": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz",

View File

@ -18,6 +18,7 @@
"axios": "^0.21.1",
"babel-plugin-react-scoped-css": "^1.1.1",
"craco-plugin-scoped-css": "^1.1.1",
"dotenv-cli": "^4.0.0",
"javascript-time-ago": "^2.3.8",
"moment": "^2.29.1",
"rc-tooltip": "^5.1.1",
@ -39,7 +40,8 @@
},
"scripts": {
"start": "PORT=4200 craco start",
"build": "craco build",
"build:dev": "dotenv -e .env.development react-scripts build",
"build:prod": "react-scripts build",
"test": "craco test",
"eject": "react-scripts eject"
},

View File

@ -15,10 +15,14 @@ import PrivateRoute from '../private-route';
export default function App() {
const dispatch = useDispatch();
const user = useSelector((s: Store.AppStore) => s.auth?.user);
useEffect(() => {
dispatch(ready());
dispatch(fetchMyGuilds());
dispatch(fetchUsers());
if (user) {
dispatch(fetchMyGuilds());
dispatch(fetchUsers());
}
}, []);
return (

View File

@ -38,7 +38,7 @@ const MemberList: React.FunctionComponent<MemberListProps> = (props: MemberListP
<div
style={{ width: '240px' }}
className="member-list bg-bg-secondary">
<Category title="Online" count={props.users.length} />
<Category title="Members" count={props.users.length} />
<div className="mt-2 ml-2">{members}</div>
</div>
);