Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a Monorepo #787

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
47cda62
feat: apps/next-frontend packages/common packages/database packages/e…
hiteshsharma-gh Jun 9, 2024
de93078
run using docker, Dockerfile and docker-compose.yml
hiteshsharma-gh Jun 11, 2024
3747137
prettier and eslint fix, github templates
hiteshsharma-gh Jun 11, 2024
a1a2a96
remove extra files
hiteshsharma-gh Jun 11, 2024
50d8b05
merge
hiteshsharma-gh Jun 11, 2024
ef02f4e
update Readme.md and fix docker-compose.yml
hiteshsharma-gh Jun 12, 2024
dc39192
formatting the whole codebase
thrishank Jun 5, 2024
141f4a9
chore: improving code maintainability for singleton cache
Jun 12, 2024
daa5be0
Update ContentRenderer.tsx
TanmayDhobale Jun 13, 2024
de9481f
Update ContentRenderer.tsx
TanmayDhobale Jun 13, 2024
81c33d7
Update ContentRenderer.tsx
TanmayDhobale Jun 13, 2024
d00f027
Update ContentRenderer.tsx
TanmayDhobale Jun 13, 2024
2e390a0
Update ContentRenderer.tsx
TanmayDhobale Jun 13, 2024
a7bb68b
Update ContentRenderer.tsx
TanmayDhobale Jun 13, 2024
dc431a8
Update ContentRenderer.tsx
TanmayDhobale Jun 13, 2024
9766360
Update ContentRenderer.tsx
TanmayDhobale Jun 13, 2024
354601a
Update ContentRenderer.tsx
TanmayDhobale Jun 13, 2024
babf9fe
Update ContentRenderer.tsx
TanmayDhobale Jun 14, 2024
be9ebc6
feat: apps/next-frontend packages/common packages/database packages/e…
hiteshsharma-gh Jun 9, 2024
6e56c4c
run using docker, Dockerfile and docker-compose.yml
hiteshsharma-gh Jun 11, 2024
f4a67f6
prettier and eslint fix, github templates
hiteshsharma-gh Jun 11, 2024
2af4ff2
merge
hiteshsharma-gh Jun 11, 2024
f5e1825
merge pull and minor fix
hiteshsharma-gh Jun 15, 2024
619a6d8
minor fix
hiteshsharma-gh Jun 15, 2024
e870d84
minor fix
hiteshsharma-gh Jun 15, 2024
39ab1dd
format
hiteshsharma-gh Jun 15, 2024
467257d
merge pull
hiteshsharma-gh Jun 15, 2024
3a1abc3
resolve conflicts
hiteshsharma-gh Jun 16, 2024
c3a39bf
add husky
hiteshsharma-gh Jun 17, 2024
ceac16a
resolve conflicts
hiteshsharma-gh Jun 20, 2024
bb19112
resolve conflicts
hiteshsharma-gh Jun 26, 2024
0ba5fea
resolve conflicts
hiteshsharma-gh Jul 8, 2024
0e5e732
resolve conflicts
hiteshsharma-gh Aug 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
node_modules
build
.git
.gitignore
.env.example
postgres-data
.next
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

120 changes: 0 additions & 120 deletions .eslintrc

This file was deleted.

10 changes: 10 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This configuration only applies to the package manager root.
/** @type {import("eslint").Linter.Config} */
module.exports = {
ignorePatterns: ["apps/**", "packages/**"],
extends: ["@repo/eslint-config/library.js"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
},
};
24 changes: 0 additions & 24 deletions .github/workflows/lint.yml

This file was deleted.

56 changes: 28 additions & 28 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
.env
# dependencies
/node_modules
/.pnp

# Dependencies
node_modules
.pnp
.pnp.js
.yarn/install-state.gz
.storybook

# docker volume
/postgres-data/
# Local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# testing
/coverage
# Testing
coverage

# next.js
/.next/
/out/
# Turbo
.turbo

# production
/build
# Vercel
.vercel

# misc
.DS_Store
*.pem
# Build Outputs
.next/
out/
build
dist

# debug

# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
# Misc
.DS_Store
*.pem

*storybook.log
postgres-data
4 changes: 0 additions & 4 deletions .husky/post-merge

This file was deleted.

7 changes: 0 additions & 7 deletions .husky/pre-commit

This file was deleted.

File renamed without changes.
6 changes: 5 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
node_modules
.github
.github
dist
.env.*
.env
postgres-data
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"plugins": [
"prettier-plugin-tailwindcss"
]
}
}
24 changes: 0 additions & 24 deletions .storybook/main.ts

This file was deleted.

15 changes: 0 additions & 15 deletions .storybook/preview.ts

This file was deleted.

10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ FROM node:20-alpine

WORKDIR /usr/src/app

COPY package.json package-lock.json ./
COPY prisma ./prisma

RUN npm install

COPY . .

RUN yarn install

EXPOSE 3000
EXPOSE 5555

CMD ["npm", "run", "dev:docker"]
CMD [ "yarn", "run", "dev:docker" ]
32 changes: 15 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
```bash
cd cms
```
3. Run the following command to start the application:

3. Run the following command to configure environment variables.
```bash
yarn run env:docker
```

4. Run the following command to start the application:
```bash
docker-compose up
```
Expand All @@ -36,28 +42,20 @@
-p 5432:5432 \
postgres
```
based on this command the connection url will be
```
DATABASE_URL=postgresql://myuser:mypassword@localhost:5432/mydatabase?schema=public
4. (optional) Run the following command to configure environment variables if you started postgres locally otherwise put you database url.
```bash
yarn run env:local
```
4. Create a `.env` file based on the `.env.example` file and configure the `DATABASE_URL` with your postgreSQL connection string.
5. Install dependencies:
```bash
npm install
yarn install
```
6. Run database migrations:
```bash
npm run prisma:migrate
```
7. Seed the database:
```bash
npm run db:seed
```
8. Start the development server:
```bash
npm run dev
```bash
yarn run dev:docker
```


## Usage

1. Access the aplication in your browser at `http://localhost:3000`
Expand Down Expand Up @@ -92,4 +90,4 @@ Read our [contribution guidelines](./CONTRIBUTING.md) for more details.
</a>

## Issues on mac Silicon
brew install pkg-config cairo pango libpng jpeg giflib librsvg
brew install pkg-config cairo pango libpng jpeg giflib librsvg
1 change: 0 additions & 1 deletion .env.example → apps/next-frontend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ NEXT_PUBLIC_BASE_URL_LOCAL=http://127.0.0.1:3000
ADMIN_SECRET="ADMIN_SECRET"
JWT_SECRET="JWT_SECRET"
# DONT CHANGE FOR RUNNING WITH DOCKER
DATABASE_URL="postgresql://postgres:postgres@db:5432/cms?schema=public"
NEXTAUTH_URL="http://localhost:3000"
APPX_AUTH_KEY="AUTH_SECRET"
NEXTAUTH_SECRET="NEXTAUTH_SECRET"
Expand Down
File renamed without changes.
Loading